You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a somewhat weird use-case where I'm merging global configs quite often (From #621). Sometimes, I want to override one of the nested fields entirely [e.g., changing the class]. It seems that even if I specify a new builds(...) that any nested arguments for that config are still kept.
This causes an issue where if the new class has a different signature without a previously specified arg, I get something like this:
hydra.errors.ConfigCompositionException: In 'modes/mode_1': ConfigKeyError raised while composing config:
Key 'other_param' not in 'PartialBuilds_NewDatasetCls'
full_key: dataset.train_dataset.other_param
The two solutions I can think of are:
A way to specify that I want a builds() to totally overwrite any previous config for that key. This would be really great, but I'm not sure this is possible given how things are setup with merging.
A slightly hackier approach [that would be totally workable] would be to simply let the configs be passed as kwargs. However, it seems that hydra_zen doesn't allow for this and will error out unless the configs are explicitly declared in the __init__ signature.
It's not a minimal reproduction (apologies for that), but here's a somewhat concise example stripped from my codebase.
I have a somewhat weird use-case where I'm merging global configs quite often (From #621). Sometimes, I want to override one of the nested fields entirely [e.g., changing the class]. It seems that even if I specify a new
builds(...)
that any nested arguments for that config are still kept.This causes an issue where if the new class has a different signature without a previously specified arg, I get something like this:
The two solutions I can think of are:
__init__
signature.It's not a minimal reproduction (apologies for that), but here's a somewhat concise example stripped from my codebase.
The text was updated successfully, but these errors were encountered: