Skip to content

How to use Hydra Sweeper with a list parameter? #2906

Answered by omry
alex-bronze-vision asked this question in Q&A
Discussion options

You must be logged in to vote

hydra.sweeper.params is a simple wrapper on top of the Compose API that takes a list of key=value strings (similar to what you pass in the command line).
Since YAML got its own idea of what is a list, you need to quote the string to avoid YAML parsing it if you want to pass a list there.

Try this.

hydra:
  sweeper:
    params:
      dataset.segmentation.dvc_versions: "[v1.1.0], [v2.0.0]"

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@alex-bronze-vision
Comment options

Answer selected by alex-bronze-vision
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants