https://kedro.org/ logo
#questions
Title
# questions
a

Artur Dobrogowski

05/30/2023, 8:15 AM
Hi has anyone found any issues when using OmegaConfigLoader from new kedro version? For me when I enabled it and made used env templating in file, the config Validator started raising issues for correct lists in yaml, error looks like this:
Copy code
ValidationError: 1 validation error for KedroMlflowConfig
tracking -> disable_tracking -> pipelines
  value is not a valid list (type=type_error.list)
While the config looks like this:
Copy code
tracking:
  disable_tracking:
    pipelines: []
j

Juan Luis

05/30/2023, 8:36 AM
hi @Artur Dobrogowski, thanks for trying it out and sorry you had a rough experience! my hunch is that the list must not be empty? https://github.com/Galileo-Galilei/kedro-mlflow/blob/845ad919c9dbd020e948e8adc2e0f9064de1ef68/kedro_mlflow/config/kedro_mlflow_config.py#L48-L50 but I'm not completely sure. cc @Yolan Honoré-Rougé
a

Artur Dobrogowski

05/30/2023, 8:36 AM
tried with non empty as well
j

Juan Luis

05/30/2023, 8:37 AM
maybe there's some transformation on the fly happening. your question on how to debug this https://kedro-org.slack.com/archives/C03RKP2LW64/p1685435091328909 is a good one. do you have a more complete traceback?
a

Artur Dobrogowski

05/30/2023, 8:38 AM
Untitled
Yeah I have traceback but didnt want to spam here with it.
The issue arises when I use omegaconfigloader, with other loaders the config is fine, so it looks like a bug to me
j

Juan Luis

05/30/2023, 8:46 AM
I can reproduce:
Copy code
from kedro.config import OmegaConfigLoader
from kedro.config import ConfigLoader
from kedro_mlflow.config.kedro_mlflow_config import KedroMlflowConfig
loader = OmegaConfigLoader(".", config_patterns={"conf": ["conf*"]})
loader_ok = ConfigLoader(".", config_patterns={"conf": ["conf*"]})
KedroMlflowConfig.parse_obj({**loader.get("conf")})
KedroMlflowConfig.parse_obj({**loader_ok.get("conf.yml")})
Copy code
$ tree .
.
├── base
│   └── conf.yml
├── local
$ cat base/conf.yml
tracking:
  disable_tracking:
    pipelines: []
now checking if this is fixed in
main
a

Artur Dobrogowski

05/30/2023, 8:51 AM
Glad that it's easily reproducible
j

Juan Luis

05/30/2023, 8:53 AM
the reason is this:
Copy code
In [2]: conf_bad = loader.get("conf")

In [3]: conf_bad
Out[3]: {'tracking': {'disable_tracking': {'pipelines': []}}}

In [4]: type(conf_bad)
Out[4]: omegaconf.dictconfig.DictConfig
it's not a real dictionary. that was the topic of https://github.com/kedro-org/kedro/issues/2466, and it's indeed fixed in the
main
branch. so, Kedro 0.18.9 will not have this problem @Artur Dobrogowski
with
main
it works
👍 1
a

Artur Dobrogowski

05/30/2023, 8:54 AM
ok great
Thanks a lot for the help
j

Juan Luis

05/30/2023, 9:22 AM
any time @Artur Dobrogowski 🙌🏼 stay tuned to #general for the upcoming release
5 Views