Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
-
I opened a bug about that: omry/omegaconf#1058 I think this would solve my problem, since it would allow extra keys from the user config and carry type information into the resulting config. Default values are still not merged, but this is by design: omry/omegaconf#412 (comment) |
Beta Was this translation helpful? Give feedback.
-
I want to have a list of Sub-Configs where Python classes are referenced and turned into partial instances.
I figured out the structured config part so far:
I want to call
hydra.utils.instantiate
once on the whole config so everything is instantiated or transformed into partials. For this I obviously need to merge the structured config with the user config.How can I achieve this in hydra / omegaconf so that:
_target_
key is enforced so that user has to provide it_partial_
key can't be overriden by the user (like to False)I tried experimenting with the merge order (omegaconf) / defaults list (hydra):
related: omry/omegaconf#412 (comment)
OmegaConf.set_struct(structured, False)
did not help_partial_
can be overriddenOmegaConf.get_type(cfg.instances[0])
reportsdict
_partial_
in the merged configget_type()
does not report the dataclassBeta Was this translation helpful? Give feedback.
All reactions