in the catalog. Is there a way to specify a lambda function in the YAML file?
06/30/2023, 9:24 AM
In the future we’ll allow you to provide a custom omegaconf resolver to do this
Today I think you’d have to do a custom dataset or hook
In general it’s seen as a big security risk to expose imperative code like this directly in yaml however
Nok Lam Chan
06/30/2023, 9:43 AM
Custom resolver is the way. We are making it easier to use. In the mean time you can do this.
if not OmegaConf.has_resolver("dummy"):
OmegaConf.register_new_resolver("dummy", lambda x: x)
CONFIG_LOADER_CLASS = OmegaConfigLoader
You don't need the full custom class, but it is a good example how to use it.