Skip to content

[Bug] Basic sweeper would behavior wrong with value type dict #3106

@clouds56

Description

@clouds56

🐛 Bug

Description

# python main.py -m +a={x:1},{x:2} +a={y:10},{y:20}

import hydra
@hydra.main(version_base="1.3", config_path=None, config_name=None)
def main(cfg) -> None:
    print(cfg)

if __name__ == "__main__":
    main()

would only run with

[2025-12-20 18:18:03,320][HYDRA] Launching 2 jobs locally
[2025-12-20 18:18:03,320][HYDRA]        #0 : +a={y:10}
{'a': {'y': 10}}
[2025-12-20 18:18:03,348][HYDRA]        #1 : +a={y:20}
{'a': {'y': 20}}

It should be run 4 jobs

[2025-12-20 18:18:03,320][HYDRA] Launching 4 jobs locally
[2025-12-20 18:18:03,320][HYDRA]        #0 : +a={x:1} +a={y:10}
{'a': {'x': 1, 'y': 10}}
[2025-12-20 18:18:03,348][HYDRA]        #1 : +a={x:1} +a={y:20}
{'a': {'x': 1, 'y': 20}}
[2025-12-20 18:18:03,373][HYDRA]        #2 : +a={x:2} +a={y:10}
{'a': {'x': 2, 'y': 10}}
[2025-12-20 18:18:03,399][HYDRA]        #3 : +a={x:2} +a={y:20}
{'a': {'x': 2, 'y': 20}}

Checklist

  • I checked on the latest version of Hydra
  • I created a minimal repro (See this for tips).

To reproduce

see above

Expected Behavior

Works the same way without -m

System information

  • Hydra Version :
  • Python version :
  • Virtual environment type and version :
  • Operating system :

Additional context

final_overrides = OrderedDict()

The basic_sweeper would only take last key into account.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions