prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  [Feature Request] [Hydra-Submitit-Launcher] Add support for passing `additional_parameters` as supported by Submititi
  # 🚀 Feature Request
  
  When calling [Submitit](https://github.com/facebookincubator/submitit) directly (not the plugin), one can pass an optional dictionary argument called [`additional_parameters`](https://github.com/facebookincubator/submitit/blob/e6fc6b2532a2ea480f08747816f14c53f526ef04/submitit/slurm/slurm.py#L432) to add parameters which are not currently available in submitit.
  
  This argument can not be passed when using the submitit-plugin. Example error:
  
  ```
  Key 'additional_parameters' not in 'SlurmQueueConf'
          full_key: hydra.launcher.additional_parameters
          reference_type=Optional[SlurmQueueConf]
          object_type=SlurmQueueConf
  ```
  
  We should add support for passing this `additional_parameters` dict via the plugin aswell.
  
  ## Motivation
  
  Same as above.
  
  ## Pitch
  
  Add support for the dict in [SlurmQueueConf](https://github.com/facebookresearch/hydra/blob/master/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/config.py#L31) and pass to submitit.AutoExecutor [here](https://github.com/facebookresearch/hydra/blob/dfbebc34020ad3d4bf1ab061565408740e62eb22/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/submitit_launcher.py#L105)
  
  **Are you willing to open a pull request?** (See [CONTRIBUTING](../../CONTRIBUTING.md)): Yes
  
  ## Additional context
  
  Since this change is quite small, is there any reason it wasnt done in the first iteration of the plugin?
  
  </issue>
  <code>
  [start of plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/config.py]
  1 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
  2 from dataclasses import dataclass
  3 from typing import Optional
  4 
  5 from hydra.core.config_store import ConfigStore
  6 
  7 
  8 @dataclass
  9 class BaseQueueConf:
  10     """Configuration shared by all executors"""
  11 
  12     submitit_folder: str = "${hydra.sweep.dir}/.submitit/%j"
  13 
  14     # maximum time for the job in minutes
  15     timeout_min: int = 60
  16     # number of cpus to use for each task
  17     cpus_per_task: int = 1
  18     # number of gpus to use on each node
  19     gpus_per_node: int = 0
  20     # number of tasks to spawn on each node
  21     tasks_per_node: int = 1
  22     # memory to reserve for the job on each node (in GB)
  23     mem_gb: int = 4
  24     # number of nodes to use for the job
  25     nodes: int = 1
  26     # name of the job
  27     name: str = "${hydra.job.name}"
  28 
  29 
  30 @dataclass
  31 class SlurmQueueConf(BaseQueueConf):
  32     """Slurm configuration overrides and specific parameters"""
  33 
  34     _target_: str = (
  35         "hydra_plugins.hydra_submitit_launcher.submitit_launcher.SlurmLauncher"
  36     )
  37 
  38     # Params are used to configure sbatch, for more info check:
  39     # https://github.com/facebookincubator/submitit/blob/master/submitit/slurm/slurm.py
  40 
  41     # Following parameters are slurm specific
  42     # More information: https://slurm.schedmd.com/sbatch.html
  43     #
  44     # slurm partition to use on the cluster
  45     partition: Optional[str] = None
  46     comment: Optional[str] = None
  47     constraint: Optional[str] = None
  48     exclude: Optional[str] = None
  49 
  50     # Following parameters are submitit specifics
  51     #
  52     # USR1 signal delay before timeout
  53     signal_delay_s: int = 120
  54     # Maximum number of retries on job timeout.
  55     # Change this only after you confirmed your code can handle re-submission
  56     # by properly resuming from the latest stored checkpoint.
  57     # check the following for more info on slurm_max_num_timeout
  58     # https://github.com/facebookincubator/submitit/blob/master/docs/checkpointing.md
  59     max_num_timeout: int = 0
  60 
  61 
  62 @dataclass
  63 class LocalQueueConf(BaseQueueConf):
  64     _target_: str = (
  65         "hydra_plugins.hydra_submitit_launcher.submitit_launcher.LocalLauncher"
  66     )
  67 
  68 
  69 # finally, register two different choices:
  70 ConfigStore.instance().store(
  71     group="hydra/launcher",
  72     name="submitit_local",
  73     node=LocalQueueConf(),
  74     provider="submitit_launcher",
  75 )
  76 
  77 
  78 ConfigStore.instance().store(
  79     group="hydra/launcher",
  80     name="submitit_slurm",
  81     node=SlurmQueueConf(),
  82     provider="submitit_launcher",
  83 )
  84
  [end of plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/config.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/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/config.py b/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/config.py
  --- a/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/config.py
  +++ b/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/config.py
  @@ -1,6 +1,6 @@
   # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
  -from dataclasses import dataclass
  -from typing import Optional
  +from dataclasses import dataclass, field
  +from typing import Any, Dict, Optional
   
   from hydra.core.config_store import ConfigStore
   
  @@ -57,6 +57,9 @@
       # check the following for more info on slurm_max_num_timeout
       # https://github.com/facebookincubator/submitit/blob/master/docs/checkpointing.md
       max_num_timeout: int = 0
  +    # Useful to add parameters which are not currently available in the plugin.
  +    # Eg: {"mail-user": "blublu@fb.com", "mail-type": "BEGIN"}
  +    additional_parameters: Dict[str, Any] = field(default_factory=dict)
   
   
   @dataclass
  
verification_info: {"golden_diff": "diff --git a/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/config.py b/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/config.py\n--- a/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/config.py\n+++ b/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/config.py\n@@ -1,6 +1,6 @@\n # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n-from dataclasses import dataclass\n-from typing import Optional\n+from dataclasses import dataclass, field\n+from typing import Any, Dict, Optional\n \n from hydra.core.config_store import ConfigStore\n \n@@ -57,6 +57,9 @@\n     # check the following for more info on slurm_max_num_timeout\n     # https://github.com/facebookincubator/submitit/blob/master/docs/checkpointing.md\n     max_num_timeout: int = 0\n+    # Useful to add parameters which are not currently available in the plugin.\n+    # Eg: {\"mail-user\": \"blublu@fb.com\", \"mail-type\": \"BEGIN\"}\n+    additional_parameters: Dict[str, Any] = field(default_factory=dict)\n \n \n @dataclass\n", "issue": "[Feature Request] [Hydra-Submitit-Launcher] Add support for passing `additional_parameters` as supported by Submititi\n# \ud83d\ude80 Feature Request\r\n\r\nWhen calling [Submitit](https://github.com/facebookincubator/submitit) directly (not the plugin), one can pass an optional dictionary argument called [`additional_parameters`](https://github.com/facebookincubator/submitit/blob/e6fc6b2532a2ea480f08747816f14c53f526ef04/submitit/slurm/slurm.py#L432) to add parameters which are not currently available in submitit.\r\n\r\nThis argument can not be passed when using the submitit-plugin. Example error:\r\n\r\n```\r\nKey 'additional_parameters' not in 'SlurmQueueConf'\r\n        full_key: hydra.launcher.additional_parameters\r\n        reference_type=Optional[SlurmQueueConf]\r\n        object_type=SlurmQueueConf\r\n```\r\n\r\nWe should add support for passing this `additional_parameters` dict via the plugin aswell.\r\n\r\n## Motivation\r\n\r\nSame as above.\r\n\r\n## Pitch\r\n\r\nAdd support for the dict in [SlurmQueueConf](https://github.com/facebookresearch/hydra/blob/master/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/config.py#L31) and pass to submitit.AutoExecutor [here](https://github.com/facebookresearch/hydra/blob/dfbebc34020ad3d4bf1ab061565408740e62eb22/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/submitit_launcher.py#L105)\r\n\r\n**Are you willing to open a pull request?** (See [CONTRIBUTING](../../CONTRIBUTING.md)): Yes\r\n\r\n## Additional context\r\n\r\nSince this change is quite small, is there any reason it wasnt done in the first iteration of the plugin?\n", "before_files": [{"content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nfrom dataclasses import dataclass\nfrom typing import Optional\n\nfrom hydra.core.config_store import ConfigStore\n\n\n@dataclass\nclass BaseQueueConf:\n    \"\"\"Configuration shared by all executors\"\"\"\n\n    submitit_folder: str = \"${hydra.sweep.dir}/.submitit/%j\"\n\n    # maximum time for the job in minutes\n    timeout_min: int = 60\n    # number of cpus to use for each task\n    cpus_per_task: int = 1\n    # number of gpus to use on each node\n    gpus_per_node: int = 0\n    # number of tasks to spawn on each node\n    tasks_per_node: int = 1\n    # memory to reserve for the job on each node (in GB)\n    mem_gb: int = 4\n    # number of nodes to use for the job\n    nodes: int = 1\n    # name of the job\n    name: str = \"${hydra.job.name}\"\n\n\n@dataclass\nclass SlurmQueueConf(BaseQueueConf):\n    \"\"\"Slurm configuration overrides and specific parameters\"\"\"\n\n    _target_: str = (\n        \"hydra_plugins.hydra_submitit_launcher.submitit_launcher.SlurmLauncher\"\n    )\n\n    # Params are used to configure sbatch, for more info check:\n    # https://github.com/facebookincubator/submitit/blob/master/submitit/slurm/slurm.py\n\n    # Following parameters are slurm specific\n    # More information: https://slurm.schedmd.com/sbatch.html\n    #\n    # slurm partition to use on the cluster\n    partition: Optional[str] = None\n    comment: Optional[str] = None\n    constraint: Optional[str] = None\n    exclude: Optional[str] = None\n\n    # Following parameters are submitit specifics\n    #\n    # USR1 signal delay before timeout\n    signal_delay_s: int = 120\n    # Maximum number of retries on job timeout.\n    # Change this only after you confirmed your code can handle re-submission\n    # by properly resuming from the latest stored checkpoint.\n    # check the following for more info on slurm_max_num_timeout\n    # https://github.com/facebookincubator/submitit/blob/master/docs/checkpointing.md\n    max_num_timeout: int = 0\n\n\n@dataclass\nclass LocalQueueConf(BaseQueueConf):\n    _target_: str = (\n        \"hydra_plugins.hydra_submitit_launcher.submitit_launcher.LocalLauncher\"\n    )\n\n\n# finally, register two different choices:\nConfigStore.instance().store(\n    group=\"hydra/launcher\",\n    name=\"submitit_local\",\n    node=LocalQueueConf(),\n    provider=\"submitit_launcher\",\n)\n\n\nConfigStore.instance().store(\n    group=\"hydra/launcher\",\n    name=\"submitit_slurm\",\n    node=SlurmQueueConf(),\n    provider=\"submitit_launcher\",\n)\n", "path": "plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/config.py"}]}