prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  No module named 'parlai_internal'
  https://parl.ai/projects/wizard_of_wikipedia/
  
  When running ```python projects/wizard_of_wikipedia/scripts/eval_retrieval_model.py``` I get the following error:
  
  ```
  Traceback (most recent call last):
    File "projects/wizard_of_wikipedia/scripts/eval_retrieval_model.py", line 48, in <module>
      eval_model(parser)
    File "/home/ml/jwang301/Development/ParlAI/parlai/scripts/eval_model.py", line 68, in eval_model
      agent = create_agent(opt, requireModelExists=True)
    File "/home/ml/jwang301/Development/ParlAI/parlai/core/agents.py", line 554, in create_agent
      model = load_agent_module(opt)
    File "/home/ml/jwang301/Development/ParlAI/parlai/core/agents.py", line 407, in load_agent_module
      model_class = get_agent_module(new_opt['model'])
    File "/home/ml/jwang301/Development/ParlAI/parlai/core/agents.py", line 516, in get_agent_module
      my_module = importlib.import_module(module_name)
    File "/home/ml/jwang301/anaconda2/envs/ParlAI/lib/python3.6/importlib/__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 994, in _gcd_import
    File "<frozen importlib._bootstrap>", line 971, in _find_and_load
    File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    File "<frozen importlib._bootstrap>", line 994, in _gcd_import
    File "<frozen importlib._bootstrap>", line 971, in _find_and_load
    File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    File "<frozen importlib._bootstrap>", line 994, in _gcd_import
    File "<frozen importlib._bootstrap>", line 971, in _find_and_load
    File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    File "<frozen importlib._bootstrap>", line 994, in _gcd_import
    File "<frozen importlib._bootstrap>", line 971, in _find_and_load
    File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
  ModuleNotFoundError: No module named 'parlai_internal'
  ```
  
  I'm assuming this is accidental since the wiki is public. 
  
  </issue>
  <code>
  [start of projects/wizard_of_wikipedia/scripts/eval_retrieval_model.py]
  1 #!/usr/bin/env python3
  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 from parlai.core.params import ParlaiParser
  7 from parlai.scripts.eval_model import eval_model
  8 from parlai.zoo.wizard_of_wikipedia\
  9     .full_dialogue_retrieval_model import download
  10 from projects.wizard_of_wikipedia.wizard_transformer_ranker\
  11     .wizard_transformer_ranker import WizardTransformerRankerAgent
  12 
  13 """Evaluate pre-trained retrieval model on the full Wizard Dialogue task.
  14 
  15 NOTE: Metrics here differ slightly to those reported in the paper as a result
  16 of code changes.
  17 
  18 Results on seen test set:
  19 Hits@1/100: 86.7
  20 
  21 Results on unseen test set (run with flag
  22 `-t wizard_of_wikipedia:WizardDialogKnowledge:topic_split`):
  23 Hits@1/100: 68.96
  24 """
  25 
  26 if __name__ == '__main__':
  27     parser = ParlaiParser(add_model_args=True)
  28     parser.add_argument('-n', '--num-examples', default=100000000)
  29     parser.add_argument('-d', '--display-examples', type='bool', default=False)
  30     parser.add_argument('-ltim', '--log-every-n-secs', type=float, default=2)
  31     WizardTransformerRankerAgent.add_cmdline_args(parser)
  32     parser.set_defaults(
  33         task='wizard_of_wikipedia',
  34         model='projects:wizard_of_wikipedia:wizard_transformer_ranker',
  35         model_file='models:wizard_of_wikipedia/full_dialogue_retrieval_model/model',
  36         datatype='test',
  37         n_heads=6,
  38         ffn_size=1200,
  39         embeddings_scale=False,
  40         delimiter=' __SOC__ ',
  41         n_positions=1000,
  42         legacy=True
  43     )
  44 
  45     opt = parser.parse_args()
  46     download(opt['datapath'])  # download pretrained retrieval model
  47 
  48     eval_model(parser)
  49
  [end of projects/wizard_of_wikipedia/scripts/eval_retrieval_model.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/scripts/eval_retrieval_model.py b/projects/wizard_of_wikipedia/scripts/eval_retrieval_model.py
  --- a/projects/wizard_of_wikipedia/scripts/eval_retrieval_model.py
  +++ b/projects/wizard_of_wikipedia/scripts/eval_retrieval_model.py
  @@ -29,7 +29,7 @@
       parser.add_argument('-d', '--display-examples', type='bool', default=False)
       parser.add_argument('-ltim', '--log-every-n-secs', type=float, default=2)
       WizardTransformerRankerAgent.add_cmdline_args(parser)
  -    parser.set_defaults(
  +    parser.set_params(
           task='wizard_of_wikipedia',
           model='projects:wizard_of_wikipedia:wizard_transformer_ranker',
           model_file='models:wizard_of_wikipedia/full_dialogue_retrieval_model/model',
  @@ -45,4 +45,4 @@
       opt = parser.parse_args()
       download(opt['datapath'])  # download pretrained retrieval model
   
  -    eval_model(parser)
  +    eval_model(opt)
  
verification_info: {"golden_diff": "diff --git a/projects/wizard_of_wikipedia/scripts/eval_retrieval_model.py b/projects/wizard_of_wikipedia/scripts/eval_retrieval_model.py\n--- a/projects/wizard_of_wikipedia/scripts/eval_retrieval_model.py\n+++ b/projects/wizard_of_wikipedia/scripts/eval_retrieval_model.py\n@@ -29,7 +29,7 @@\n     parser.add_argument('-d', '--display-examples', type='bool', default=False)\n     parser.add_argument('-ltim', '--log-every-n-secs', type=float, default=2)\n     WizardTransformerRankerAgent.add_cmdline_args(parser)\n-    parser.set_defaults(\n+    parser.set_params(\n         task='wizard_of_wikipedia',\n         model='projects:wizard_of_wikipedia:wizard_transformer_ranker',\n         model_file='models:wizard_of_wikipedia/full_dialogue_retrieval_model/model',\n@@ -45,4 +45,4 @@\n     opt = parser.parse_args()\n     download(opt['datapath'])  # download pretrained retrieval model\n \n-    eval_model(parser)\n+    eval_model(opt)\n", "issue": "No module named 'parlai_internal'\nhttps://parl.ai/projects/wizard_of_wikipedia/\r\n\r\nWhen running ```python projects/wizard_of_wikipedia/scripts/eval_retrieval_model.py``` I get the following error:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"projects/wizard_of_wikipedia/scripts/eval_retrieval_model.py\", line 48, in <module>\r\n    eval_model(parser)\r\n  File \"/home/ml/jwang301/Development/ParlAI/parlai/scripts/eval_model.py\", line 68, in eval_model\r\n    agent = create_agent(opt, requireModelExists=True)\r\n  File \"/home/ml/jwang301/Development/ParlAI/parlai/core/agents.py\", line 554, in create_agent\r\n    model = load_agent_module(opt)\r\n  File \"/home/ml/jwang301/Development/ParlAI/parlai/core/agents.py\", line 407, in load_agent_module\r\n    model_class = get_agent_module(new_opt['model'])\r\n  File \"/home/ml/jwang301/Development/ParlAI/parlai/core/agents.py\", line 516, in get_agent_module\r\n    my_module = importlib.import_module(module_name)\r\n  File \"/home/ml/jwang301/anaconda2/envs/ParlAI/lib/python3.6/importlib/__init__.py\", line 126, in import_module\r\n    return _bootstrap._gcd_import(name[level:], package, level)\r\n  File \"<frozen importlib._bootstrap>\", line 994, in _gcd_import\r\n  File \"<frozen importlib._bootstrap>\", line 971, in _find_and_load\r\n  File \"<frozen importlib._bootstrap>\", line 941, in _find_and_load_unlocked\r\n  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\r\n  File \"<frozen importlib._bootstrap>\", line 994, in _gcd_import\r\n  File \"<frozen importlib._bootstrap>\", line 971, in _find_and_load\r\n  File \"<frozen importlib._bootstrap>\", line 941, in _find_and_load_unlocked\r\n  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\r\n  File \"<frozen importlib._bootstrap>\", line 994, in _gcd_import\r\n  File \"<frozen importlib._bootstrap>\", line 971, in _find_and_load\r\n  File \"<frozen importlib._bootstrap>\", line 941, in _find_and_load_unlocked\r\n  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\r\n  File \"<frozen importlib._bootstrap>\", line 994, in _gcd_import\r\n  File \"<frozen importlib._bootstrap>\", line 971, in _find_and_load\r\n  File \"<frozen importlib._bootstrap>\", line 953, in _find_and_load_unlocked\r\nModuleNotFoundError: No module named 'parlai_internal'\r\n```\r\n\r\nI'm assuming this is accidental since the wiki is public. \n", "before_files": [{"content": "#!/usr/bin/env python3\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.\nfrom parlai.core.params import ParlaiParser\nfrom parlai.scripts.eval_model import eval_model\nfrom parlai.zoo.wizard_of_wikipedia\\\n    .full_dialogue_retrieval_model import download\nfrom projects.wizard_of_wikipedia.wizard_transformer_ranker\\\n    .wizard_transformer_ranker import WizardTransformerRankerAgent\n\n\"\"\"Evaluate pre-trained retrieval model on the full Wizard Dialogue task.\n\nNOTE: Metrics here differ slightly to those reported in the paper as a result\nof code changes.\n\nResults on seen test set:\nHits@1/100: 86.7\n\nResults on unseen test set (run with flag\n`-t wizard_of_wikipedia:WizardDialogKnowledge:topic_split`):\nHits@1/100: 68.96\n\"\"\"\n\nif __name__ == '__main__':\n    parser = ParlaiParser(add_model_args=True)\n    parser.add_argument('-n', '--num-examples', default=100000000)\n    parser.add_argument('-d', '--display-examples', type='bool', default=False)\n    parser.add_argument('-ltim', '--log-every-n-secs', type=float, default=2)\n    WizardTransformerRankerAgent.add_cmdline_args(parser)\n    parser.set_defaults(\n        task='wizard_of_wikipedia',\n        model='projects:wizard_of_wikipedia:wizard_transformer_ranker',\n        model_file='models:wizard_of_wikipedia/full_dialogue_retrieval_model/model',\n        datatype='test',\n        n_heads=6,\n        ffn_size=1200,\n        embeddings_scale=False,\n        delimiter=' __SOC__ ',\n        n_positions=1000,\n        legacy=True\n    )\n\n    opt = parser.parse_args()\n    download(opt['datapath'])  # download pretrained retrieval model\n\n    eval_model(parser)\n", "path": "projects/wizard_of_wikipedia/scripts/eval_retrieval_model.py"}]}