Juan Luis
05/23/2023, 6:00 AMConfigLoader
and OmegaConfigLoader
. while following the standalone-datacatalog starter, I notice that
ConfigLoader("conf").get("catalog.yml")
works, but
OmegaConfigLoader("conf").get("catalog.yml")
returns None
. on the other hand, OmegaConfigLoader("conf").get("catalog")
seems to work (notice no .yml
extension), and OmegaConfigLoader("conf")["catalog"]
works consistently for both config loaders.
is this intentional? compare for example https://github.com/kedro-org/kedro/blob/41f03d9/tests/config/test_config.py#L116 with https://github.com/kedro-org/kedro/blob/41f03d9/tests/config/test_omegaconf_config.py#L149Merel
05/23/2023, 8:26 AMOmegaConfigLoader
was never meant to be a complete copy of ConfigLoader
. The .get("catalog.yml")
way of doing things is old and you should be using the newer way as described here: https://docs.kedro.org/en/stable/configuration/configuration_basics.html#configuration-patternsJuan Luis
05/23/2023, 8:36 AMconfig_patterns
addresses this though - what would be the "new" way of retrieving the catalog config from a *ConfigLoader
?
loader = *ConfigLoader("conf", config_patterns=...)
loader.?
Merel
05/23/2023, 8:37 AMconfig_patterns = {
"catalog": ["catalog*", "catalog*/**", "**/catalog*"],
"parameters": ["parameters*", "parameters*/**", "**/parameters*"],
"credentials": ["credentials*", "credentials*/**", "**/credentials*"],
"logging": ["logging*", "logging*/**", "**/logging*"],
}
Juan Luis
05/23/2023, 8:37 AMloader.get
or loader[]
should receive one of the keys of config_patterns
, right?Merel
05/23/2023, 8:37 AMJuan Luis
05/23/2023, 8:38 AM