-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OmegaConf.missing_keys(cfg)
may fail if contained customized resolver field that the depends on some missing fields.
#1118
Comments
Well, seems that even a simple interpolation field will crash, not customized resolver needed. import omegaconf
cfg = omegaconf.OmegaConf.create({'a': '???', 'b': '${.a}'})
omegaconf.OmegaConf.missing_keys(cfg) |
For reference, here's the traceback produced by the example from the OP:
It looks like invoking |
@odelalleau, thoughts? |
#1117 looks good to me. Back then we settled on interpolations never being considered as missing (so for instance for the config given as example in this issue, I don't remember the details, but I believe that there were potential issues in "propagating" missing values through interpolations / resolvers. |
Describe the bug
When a config contains customized resolvers which depend on some missing field(s), calling
OmegaConf.missing_keys(cfg)
raise an error.To Reproduce
Expected behavior
Should just return
{'a', 'b'}
Additional context
Direct Solution
I create a pull request for that fix, please see #1117
The text was updated successfully, but these errors were encountered: