Skip to content

specify config outside of defaults list #2528

Answered by Jasha10
dagap asked this question in Q&A
Discussion options

You must be logged in to vote

Hydra's defaults list is the primary supported means for "including" other configs (i.e. yaml files) into your composed output config.

A few alternatives to the defaults list:

  • If you work at the lower level of OmegaConf, you might be able to define an omegaconf Custom Resolver that includes a yaml file from a given path: transforms: "${my_custom_oc_file_loader:batch.yaml}"
  • You could use python code to inspect the value of datasets[0].transforms and then load the given yaml file via OmegaConf.load or pyyaml.

Both of these alternatives sidestep Hydra.
For a Hydra solution using the defaults list, you could try something like this:

defaults:
  - [email protected]: live.yaml

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@dagap
Comment options

@dagap
Comment options

@Jasha10
Comment options

Jasha10 Jan 11, 2023
Collaborator

@dagap
Comment options

@Jasha10
Comment options

Jasha10 Jan 20, 2023
Collaborator

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