-
Notifications
You must be signed in to change notification settings - Fork 106
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
Interpolations that resolve to missing value ???
don't get passed to resolvers
#1130
Comments
This is by design and unlikely to change. Allowing missing values to be passed as input to resolvers would force all resolvers to implement some handling of missing values, which we definitely don't want. What might be possible is adding a flag to By the way this makes me realize there is an issue: I was expecting |
Is this functionality actually located on the resolver side or in the |
The error is raised during resolution, at Line 670 in 7dae67e
Currently it's not caught so it just makes the program crash. If we wanted to allow a resolver to process a missing value, I think we'd need to catch this exception at omegaconf/omegaconf/grammar_visitor.py Line 174 in 97c0a47
Note that looking at the code I noticed there's a workaround: use |
Is your feature request related to a problem? Please describe.
I have some compare-resolver that checks if some values are equal or not. When I tried to compare against the MISSING_VALUE
???
, the resolver does not get called.Here's a simpler repro-example with a resolver, that just prints its input:
I think it's a general problem with the missing value. The value for
a
at the end should beNone
and not???
. I can follow the reasons why it's implemented in that way, that if some sub-interpolations are???
, the whole interpolation gets evaluated as???
.Describe the solution you'd like
Ideally such an interpolation should be treated as a normal value like the string
???
unless you call some function withthrow_on_missing = true
.Thanks in advance for your help!
The text was updated successfully, but these errors were encountered: