Combine StructuredConfigs and YAML files via composition #757
Unanswered
addisonklinke
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
On the whole, I strongly agree with Hydra-Zen's philosophy of removing YAML files and building StructuredConfigs directly from code. However, for ML there's a use-case where I think I still want some of the config to live in YAML files. For example, when training a model I'll need an explicit list of feature names (corresponding to columns in the dataset). I don't see a way to do this with StructuredConfigs because
Here's an example script to demonstrate
If
features
was a short list, this would be fineHowever when I try to give a longer list with a YAML
@hydra.main(config_path="config")
isn't picking this up, and so explicit CLI input is still requiredI also tried renaming
config/model.yaml -> config/config.yaml
to align directly with theconfig_path
param of@hydra.main()
, but that runs into the followingwhich makes it appear Hydra assumes I want the StructuredConfig to validate the schema of my YAML, when in fact I want to compose the StructuredConfig and YAML together. Surely there's got to be a way to do this?
Beta Was this translation helpful? Give feedback.
All reactions