Feature:
Currently, calling OmegaConf.to_container(cfg) can result in a python object that contains some "???" MISSING strings.
I propose to add a throw_on_missing keyword argument to OmegaConf.to_container, so that the structure returned by OmegaConf.to_container(cfg, throw_on_missing=True) will raise omegaconf.MissingMandatoryValue if any missing values are encountered.
This way, if no MissingMandatorValue is raised, clients can be assured that the result of to_container does not contain any "???" strings.
To maintain backward compatibility, the default would be throw_on_missing=False.
Feature:
Currently, calling
OmegaConf.to_container(cfg)can result in a python object that contains some"???"MISSING strings.I propose to add a
throw_on_missingkeyword argument toOmegaConf.to_container, so that the structure returned byOmegaConf.to_container(cfg, throw_on_missing=True)will raiseomegaconf.MissingMandatoryValueif any missing values are encountered.This way, if no
MissingMandatorValueis raised, clients can be assured that the result ofto_containerdoes not contain any"???"strings.To maintain backward compatibility, the default would be
throw_on_missing=False.