You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the new OmegaConfigLoader templating/variable interpolation works out of the box for parameters, but not for catalog files. This is because the catalog goes through a validation check which checks if all entries in it are valid datasets. When using the ConfigLoader or TemplatedConfigLoader, users can have entries with "yaml anchors", those need to be preceded by an underscore _ so they're skipped from the catalog validation.
Context
Variable interpolation is a core feature of omegaconf and allows users to make their configuration files "smarter" and more reusable. Even with the addition of parsing syntax to the catalog to minimise the number of catalog entries (#2423), it is desirable to allow users to fully leverage omegaconf variable interpolation in the catalog as well as parameters.
Possible Implementation
Require template values to be preceded by a special character, e.g. _ so they're not read as a dataset in the catalog validation.
This idea was already discussed as part of: #2175
A concern with this implementation is that it introduces special Kedro syntax to enable core omegaconf functionality. Users would then not be able to just use the omegaconf docs to find out how variable interpolation works.
Possible Alternatives
Another way to skip the catalog validation
Resolve variables at an earlier time. Currently, resolution happens at access.
The text was updated successfully, but these errors were encountered:
Description
In the new
OmegaConfigLoader
templating/variable interpolation works out of the box for parameters, but not for catalog files. This is because the catalog goes through a validation check which checks if all entries in it are valid datasets. When using theConfigLoader
orTemplatedConfigLoader
, users can have entries with "yaml anchors", those need to be preceded by an underscore_
so they're skipped from the catalog validation.Context
Variable interpolation is a core feature of omegaconf and allows users to make their configuration files "smarter" and more reusable. Even with the addition of parsing syntax to the catalog to minimise the number of catalog entries (#2423), it is desirable to allow users to fully leverage omegaconf variable interpolation in the catalog as well as parameters.
Possible Implementation
Require template values to be preceded by a special character, e.g.
_
so they're not read as a dataset in the catalog validation.You could then have a catalog like this:
This idea was already discussed as part of: #2175
A concern with this implementation is that it introduces special Kedro syntax to enable core omegaconf functionality. Users would then not be able to just use the
omegaconf
docs to find out how variable interpolation works.Possible Alternatives
The text was updated successfully, but these errors were encountered: