In the following example, OmegaConf.is_missing(config, "a") is False before calling OmegaConf.resolve, and it becomes True after calling OmegaConf.resolve.
from omegaconf import OmegaConf
def no_op(x):
pass
OmegaConf.register_new_resolver("no_op", no_op)
config = OmegaConf.create({"a": "${no_op:${b}}", "b": "???"})
assert not OmegaConf.is_missing(config, "a")
OmegaConf.resolve(config)
assert not OmegaConf.is_missing(config, "a") # AssertionError
By the way this makes me realize there is an issue: I was expecting OmegaConf.resolve(config) to crash, but it didn't. This is annoying because after resolution OmegaConf.is_missing(config, "a") is True, while it is False before => this is definitely a discrepancy that should be looked into.
In the following example,
OmegaConf.is_missing(config, "a")
isFalse
before callingOmegaConf.resolve
, and it becomesTrue
after callingOmegaConf.resolve
.This violates the principle that working with a resolved config should give the same results as working with an unresolved config. Based on @odelalleau's comment in https://github.com/omry/omegaconf/issues/1130#issuecomment-1757741616