When merging DictConfs and interpolation fails due to MISSING, the default dataclass is used #1205
Open
4 tasks done
Labels
bug
Something isn't working
Describe the bug
If I merge two configs with the same schema but where one has a missing value that another entry uses for interpolation, the default dataclass for that variable type is used instead. This is dangerous since using the default is definitely not intended!
For instance, my use case merging resolved and unresolved configs to give a config which is "as resolved as possible"
To Reproduce
Output:
Expected behavior
cfg2 should not have the default
B
it should remain unresolved since I'm merging with a a config that contains???
.A merge of
'${interpolation}' <- '???'
should result in '${interpolation}' not the default dataclass.In a merge, MISSING must not be preferred and certainly a default dataclass should not be preferred
Output should read:
{'a': '???', 'b': {'b': '${a}'}}
Additional context
The undesired behaviour seems to occur in
expand
function that is inside BaseContainer._map_merge:val = rt
.The text was updated successfully, but these errors were encountered: