prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  embeddingsize or embedding_size
  When I search 'embeddingsize' in this repository, I see many files referencing `opt['embeddingsize']` and similarly for 'embedding_size'. Unless there is a real reason for having both, could you please merge the two options 'embeddingsize' and 'embedding_size'? This threw me off. Here is one example set of files:
  
  'embeddingsize'
  https://github.com/facebookresearch/ParlAI/blob/a43f2880719c5a048fdf3d0aa5d5b25eeb9a1a41/projects/wizard_of_wikipedia/generator/train_end2end.py#L21
  
  'embedding_size'
  https://github.com/facebookresearch/ParlAI/blob/8ab911a29dbbe5cfb7d3e615cccf8f4c76066ff1/projects/wizard_of_wikipedia/generator/agents.py#L33
  
  </issue>
  <code>
  [start of projects/wizard_of_wikipedia/generator/train_end2end.py]
  1 #!/usr/bin/env python
  2 
  3 # Copyright (c) Facebook, Inc. and its affiliates.
  4 # This source code is licensed under the MIT license found in the
  5 # LICENSE file in the root directory of this source tree.
  6 
  7 from parlai.scripts.train_model import setup_args, TrainLoop
  8 
  9 if __name__ == '__main__':
  10     parser = setup_args()
  11     parser.set_defaults(
  12         task='wizard_of_wikipedia:generator:random_split',
  13         model='projects.wizard_of_wikipedia.generator.agents:EndToEndAgent',
  14         model_file='/tmp/end2end_generator/model',
  15         dict_lower=True,
  16         dict_tokenizer='bpe',
  17         n_layers=5,
  18         n_heads=2,
  19         dropout=0.20,
  20         ffn_size=512,
  21         embeddingsize=256,
  22         log_every_n_secs=10,
  23         validation_patience=12,
  24         validation_metric='ppl',
  25         validation_metric_mode='min',
  26         validation_every_n_epochs=0.5,
  27         n_positions=128,
  28         truncate=128,
  29         max_knowledge=32,
  30         knowledge_alpha=0.95,
  31         knowledge_truncate=32,
  32         learningrate=5e-4,
  33         warmup_updates=5000,
  34         clip=0.1,
  35         lr_scheduler='invsqrt',
  36         embedding_type='fasttext',
  37         beam_size=1,
  38         skip_generation=False,
  39         batchsize=64,
  40     )
  41     TrainLoop(parser.parse_args()).train()
  42
  [end of projects/wizard_of_wikipedia/generator/train_end2end.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/projects/wizard_of_wikipedia/generator/train_end2end.py b/projects/wizard_of_wikipedia/generator/train_end2end.py
  --- a/projects/wizard_of_wikipedia/generator/train_end2end.py
  +++ b/projects/wizard_of_wikipedia/generator/train_end2end.py
  @@ -18,7 +18,7 @@
           n_heads=2,
           dropout=0.20,
           ffn_size=512,
  -        embeddingsize=256,
  +        embedding_size=256,
           log_every_n_secs=10,
           validation_patience=12,
           validation_metric='ppl',
  
verification_info: {"golden_diff": "diff --git a/projects/wizard_of_wikipedia/generator/train_end2end.py b/projects/wizard_of_wikipedia/generator/train_end2end.py\n--- a/projects/wizard_of_wikipedia/generator/train_end2end.py\n+++ b/projects/wizard_of_wikipedia/generator/train_end2end.py\n@@ -18,7 +18,7 @@\n         n_heads=2,\n         dropout=0.20,\n         ffn_size=512,\n-        embeddingsize=256,\n+        embedding_size=256,\n         log_every_n_secs=10,\n         validation_patience=12,\n         validation_metric='ppl',\n", "issue": "embeddingsize or embedding_size\nWhen I search 'embeddingsize' in this repository, I see many files referencing `opt['embeddingsize']` and similarly for 'embedding_size'. Unless there is a real reason for having both, could you please merge the two options 'embeddingsize' and 'embedding_size'? This threw me off. Here is one example set of files:\r\n\r\n'embeddingsize'\r\nhttps://github.com/facebookresearch/ParlAI/blob/a43f2880719c5a048fdf3d0aa5d5b25eeb9a1a41/projects/wizard_of_wikipedia/generator/train_end2end.py#L21\r\n\r\n'embedding_size'\r\nhttps://github.com/facebookresearch/ParlAI/blob/8ab911a29dbbe5cfb7d3e615cccf8f4c76066ff1/projects/wizard_of_wikipedia/generator/agents.py#L33\n", "before_files": [{"content": "#!/usr/bin/env python\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom parlai.scripts.train_model import setup_args, TrainLoop\n\nif __name__ == '__main__':\n    parser = setup_args()\n    parser.set_defaults(\n        task='wizard_of_wikipedia:generator:random_split',\n        model='projects.wizard_of_wikipedia.generator.agents:EndToEndAgent',\n        model_file='/tmp/end2end_generator/model',\n        dict_lower=True,\n        dict_tokenizer='bpe',\n        n_layers=5,\n        n_heads=2,\n        dropout=0.20,\n        ffn_size=512,\n        embeddingsize=256,\n        log_every_n_secs=10,\n        validation_patience=12,\n        validation_metric='ppl',\n        validation_metric_mode='min',\n        validation_every_n_epochs=0.5,\n        n_positions=128,\n        truncate=128,\n        max_knowledge=32,\n        knowledge_alpha=0.95,\n        knowledge_truncate=32,\n        learningrate=5e-4,\n        warmup_updates=5000,\n        clip=0.1,\n        lr_scheduler='invsqrt',\n        embedding_type='fasttext',\n        beam_size=1,\n        skip_generation=False,\n        batchsize=64,\n    )\n    TrainLoop(parser.parse_args()).train()\n", "path": "projects/wizard_of_wikipedia/generator/train_end2end.py"}]}