From d6d224ac48715e935ad2f625c324d4c8ad5bf2ef Mon Sep 17 00:00:00 2001 From: Nok Chan Date: Fri, 24 Mar 2023 17:52:05 +0000 Subject: [PATCH 01/15] Fix typehint Signed-off-by: Nok Chan --- kedro/config/omegaconf_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kedro/config/omegaconf_config.py b/kedro/config/omegaconf_config.py index c3d0d02f27..eb5ae78b33 100644 --- a/kedro/config/omegaconf_config.py +++ b/kedro/config/omegaconf_config.py @@ -8,7 +8,7 @@ from typing import Any, Dict, Iterable, List, Optional, Set # noqa import fsspec -from omegaconf import OmegaConf +from omegaconf import DictConfig, OmegaConf from omegaconf.resolvers import oc from yaml.parser import ParserError from yaml.scanner import ScannerError @@ -311,7 +311,7 @@ def _check_duplicates(seen_files_to_keys: Dict[Path, Set[Any]]): raise ValueError(f"{dup_str}") @staticmethod - def _resolve_environment_variables(config: Dict[str, Any]) -> None: + def _resolve_environment_variables(config: DictConfig) -> None: """Use the ``oc.env`` resolver to read environment variables and replace them in-place, clearing the resolver after the operation is complete if it was not registered beforehand. From 78c1ae002b54c67f8f0b6831a9ddfe5afcf3cfaa Mon Sep 17 00:00:00 2001 From: Nok Chan Date: Mon, 27 Mar 2023 16:21:36 +0100 Subject: [PATCH 02/15] test push Signed-off-by: Nok Chan --- kedro/framework/project/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kedro/framework/project/__init__.py b/kedro/framework/project/__init__.py index 8a4922d0ba..bce64dc7d2 100644 --- a/kedro/framework/project/__init__.py +++ b/kedro/framework/project/__init__.py @@ -236,10 +236,12 @@ def configure(self, logging_config: Dict[str, Any]) -> None: logging.yml). We store this in the UserDict data so that it can be reconfigured in _bootstrap_subprocess. """ + print("DEBUG", logging_config) logging.config.dictConfig(logging_config) self.data = logging_config + PACKAGE_NAME = None LOGGING = _ProjectLogging() From 5b0bff8504fbe1dcb00b4132dcc08a01b059c7dd Mon Sep 17 00:00:00 2001 From: Nok Chan Date: Wed, 29 Mar 2023 18:46:10 +0100 Subject: [PATCH 03/15] POC of fix to solve the runtime param resolution problem Signed-off-by: Nok Chan --- kedro/config/omegaconf_config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kedro/config/omegaconf_config.py b/kedro/config/omegaconf_config.py index eb5ae78b33..711652882e 100644 --- a/kedro/config/omegaconf_config.py +++ b/kedro/config/omegaconf_config.py @@ -129,6 +129,8 @@ def __init__( env=env, runtime_params=runtime_params, ) + if not self.runtime_params: + self.runtime_params = {} def __getitem__(self, key) -> Dict[str, Any]: """Get configuration files by key, load and merge them, and @@ -275,7 +277,9 @@ def load_and_merge_dir_config( return {} if len(aggregate_config) == 1: return list(aggregate_config)[0] - return dict(OmegaConf.merge(*aggregate_config)) + return OmegaConf.to_container( + OmegaConf.merge(*aggregate_config, self.runtime_params), resolve=True + ) def _is_valid_config_path(self, path): """Check if given path is a file path and file type is yaml or json.""" From 2c9da408c81003a46a991b1ccc1d3a19bba14be6 Mon Sep 17 00:00:00 2001 From: Nok Chan Date: Tue, 2 May 2023 14:15:01 +0100 Subject: [PATCH 04/15] Fix OmegaConfigLoadaer - resolve runtime_params early Signed-off-by: Nok Chan --- kedro/config/omegaconf_config.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/kedro/config/omegaconf_config.py b/kedro/config/omegaconf_config.py index 3211c925bf..ef00397fd2 100644 --- a/kedro/config/omegaconf_config.py +++ b/kedro/config/omegaconf_config.py @@ -168,7 +168,7 @@ def __getitem__(self, key) -> Dict[str, Any]: else: base_path = str(Path(self._fs.ls("", detail=False)[-1]) / self.base_env) base_config = self.load_and_merge_dir_config( - base_path, patterns, read_environment_variables + base_path, patterns, key, read_environment_variables ) config = base_config @@ -179,7 +179,7 @@ def __getitem__(self, key) -> Dict[str, Any]: else: env_path = str(Path(self._fs.ls("", detail=False)[-1]) / run_env) env_config = self.load_and_merge_dir_config( - env_path, patterns, read_environment_variables + env_path, patterns, key, read_environment_variables ) # Destructively merge the two env dirs. The chosen env will override base. @@ -211,6 +211,7 @@ def load_and_merge_dir_config( self, conf_path: str, patterns: Iterable[str], + key: str, read_environment_variables: Optional[bool] = False, ) -> Dict[str, Any]: """Recursively load and merge all configuration files in a directory using OmegaConf, @@ -277,9 +278,16 @@ def load_and_merge_dir_config( return {} if len(aggregate_config) == 1: return list(aggregate_config)[0] - return OmegaConf.to_container( - OmegaConf.merge(*aggregate_config, self.runtime_params), resolve=True - ) + + if key == "parameters": + # Merge with runtime parameters only for "parameters" + return OmegaConf.to_container( + OmegaConf.merge(*aggregate_config, self.runtime_params), resolve=True + ) + else: + return OmegaConf.to_container( + OmegaConf.merge(*aggregate_config), resolve=True + ) def _is_valid_config_path(self, path): """Check if given path is a file path and file type is yaml or json.""" From f578c39db668969c796bd31dc75c860012fe4819 Mon Sep 17 00:00:00 2001 From: Nok Chan Date: Tue, 2 May 2023 14:17:35 +0100 Subject: [PATCH 05/15] Delegate the intialization of runtime_params to AbstractConfigLoader Signed-off-by: Nok Chan --- kedro/config/abstract_config.py | 2 +- kedro/config/omegaconf_config.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/kedro/config/abstract_config.py b/kedro/config/abstract_config.py index 0515b96ee7..ae8a22ec16 100644 --- a/kedro/config/abstract_config.py +++ b/kedro/config/abstract_config.py @@ -22,7 +22,7 @@ def __init__( super().__init__() self.conf_source = conf_source self.env = env - self.runtime_params = runtime_params + self.runtime_params = runtime_params or {} class BadConfigException(Exception): diff --git a/kedro/config/omegaconf_config.py b/kedro/config/omegaconf_config.py index ef00397fd2..9dad8edc79 100644 --- a/kedro/config/omegaconf_config.py +++ b/kedro/config/omegaconf_config.py @@ -129,8 +129,6 @@ def __init__( env=env, runtime_params=runtime_params, ) - if not self.runtime_params: - self.runtime_params = {} def __getitem__(self, key) -> Dict[str, Any]: """Get configuration files by key, load and merge them, and From de98e1572b9c1b6ac7c487e96172677ed3ffba31 Mon Sep 17 00:00:00 2001 From: Nok Chan Date: Tue, 2 May 2023 14:52:48 +0100 Subject: [PATCH 06/15] Add test for interpolated value and globals Signed-off-by: Nok Chan --- kedro/framework/project/__init__.py | 2 -- tests/config/test_omegaconf_config.py | 29 +++++++++++++++++++++++---- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/kedro/framework/project/__init__.py b/kedro/framework/project/__init__.py index d562c7d56b..96d5b839ba 100644 --- a/kedro/framework/project/__init__.py +++ b/kedro/framework/project/__init__.py @@ -237,12 +237,10 @@ def configure(self, logging_config: Dict[str, Any]) -> None: logging.yml). We store this in the UserDict data so that it can be reconfigured in _bootstrap_subprocess. """ - print("DEBUG", logging_config) logging.config.dictConfig(logging_config) self.data = logging_config - PACKAGE_NAME = None LOGGING = _ProjectLogging() diff --git a/tests/config/test_omegaconf_config.py b/tests/config/test_omegaconf_config.py index adec03cbb1..6c2188e879 100644 --- a/tests/config/test_omegaconf_config.py +++ b/tests/config/test_omegaconf_config.py @@ -69,14 +69,20 @@ def local_config(tmp_path): @pytest.fixture def create_config_dir(tmp_path, base_config, local_config): - proj_catalog = tmp_path / _BASE_ENV / "catalog.yml" + base_catalog = tmp_path / _BASE_ENV / "catalog.yml" local_catalog = tmp_path / _DEFAULT_RUN_ENV / "catalog.yml" parameters = tmp_path / _BASE_ENV / "parameters.json" - project_parameters = {"param1": 1, "param2": 2} + base_parameters = {"param1": 1, "param2": 2, "templated_param": "${global}"} + base_global_parameters = {"global": "base"} + local_global_parameters = {"global": "local"} - _write_yaml(proj_catalog, base_config) + _write_yaml(base_catalog, base_config) _write_yaml(local_catalog, local_config) - _write_json(parameters, project_parameters) + _write_json(parameters, base_parameters) + _write_json(tmp_path / _BASE_ENV / "parameters_global.json", base_global_parameters) + _write_json( + tmp_path / _DEFAULT_RUN_ENV / "parameters_global.json", local_global_parameters + ) @pytest.fixture @@ -530,3 +536,18 @@ def zipdir(path, ziph): conf = OmegaConfigLoader(conf_source=f"{tmp_path}/Python.zip") catalog = conf["catalog"] assert catalog["trains"]["type"] == "MemoryDataSet" + + @use_config_dir + def test_variable_interpolation_with_correct_env(self, tmp_path): + """Make sure the parameters is interpolated with the correct environment""" + conf = OmegaConfigLoader(str(tmp_path)) + params = conf["parameters"] + # Making sure it is not override by local/parameters_global.yml + assert params["templated_param"] == "base" + + @use_config_dir + def test_runtime_params_override_interpolated_value(self, tmp_path): + """Make sure the parameters is interpolated with the correct environment""" + conf = OmegaConfigLoader(str(tmp_path), runtime_params={"global": "global"}) + params = conf["parameters"] + assert params["templated_param"] == "global" From 4c0571dabda981a7977a0c1f773da74f62d2de05 Mon Sep 17 00:00:00 2001 From: Nok Chan Date: Tue, 2 May 2023 14:57:22 +0100 Subject: [PATCH 07/15] add more test and linting Signed-off-by: Nok Chan --- kedro/config/abstract_config.py | 2 +- kedro/config/omegaconf_config.py | 8 ++++---- tests/config/test_omegaconf_config.py | 14 +++++++++++++- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/kedro/config/abstract_config.py b/kedro/config/abstract_config.py index ae8a22ec16..e40c0f2c60 100644 --- a/kedro/config/abstract_config.py +++ b/kedro/config/abstract_config.py @@ -17,7 +17,7 @@ def __init__( conf_source: str, env: str = None, runtime_params: Dict[str, Any] = None, - **kwargs + **kwargs, ): super().__init__() self.conf_source = conf_source diff --git a/kedro/config/omegaconf_config.py b/kedro/config/omegaconf_config.py index 9dad8edc79..1bafa3bbf2 100644 --- a/kedro/config/omegaconf_config.py +++ b/kedro/config/omegaconf_config.py @@ -280,12 +280,12 @@ def load_and_merge_dir_config( if key == "parameters": # Merge with runtime parameters only for "parameters" return OmegaConf.to_container( - OmegaConf.merge(*aggregate_config, self.runtime_params), resolve=True - ) + OmegaConf.merge(*aggregate_config, self.runtime_params), resolve=True + ) else: return OmegaConf.to_container( - OmegaConf.merge(*aggregate_config), resolve=True - ) + OmegaConf.merge(*aggregate_config), resolve=True + ) def _is_valid_config_path(self, path): """Check if given path is a file path and file type is yaml or json.""" diff --git a/tests/config/test_omegaconf_config.py b/tests/config/test_omegaconf_config.py index 6c2188e879..c04ef26d35 100644 --- a/tests/config/test_omegaconf_config.py +++ b/tests/config/test_omegaconf_config.py @@ -547,7 +547,19 @@ def test_variable_interpolation_with_correct_env(self, tmp_path): @use_config_dir def test_runtime_params_override_interpolated_value(self, tmp_path): - """Make sure the parameters is interpolated with the correct environment""" + """Make sure interpolated value is updated correctly with runtime_params""" conf = OmegaConfigLoader(str(tmp_path), runtime_params={"global": "global"}) params = conf["parameters"] assert params["templated_param"] == "global" + + @use_config_dir + def test_runtime_params_not_propogate_non_parameters_config(self, tmp_path): + """Make sure `catalog`, `credetials` won't get updated by runtime_params""" + # https://github.com/kedro-org/kedro/pull/2467 + conf = OmegaConfigLoader(str(tmp_path), runtime_params={"global": "global"}) + cred = conf["credentials"] + catalog = conf["catalog"] + logging = conf["logging"] + assert "global" not in cred + assert "global" not in catalog + assert "global" not in logging From f1c1ec2b1d5695ec8cf67541da3ff4de5f1b2b65 Mon Sep 17 00:00:00 2001 From: Nok Chan Date: Tue, 2 May 2023 16:30:23 +0100 Subject: [PATCH 08/15] refactor Signed-off-by: Nok Chan --- kedro/config/omegaconf_config.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kedro/config/omegaconf_config.py b/kedro/config/omegaconf_config.py index 1bafa3bbf2..1eefa1d196 100644 --- a/kedro/config/omegaconf_config.py +++ b/kedro/config/omegaconf_config.py @@ -218,6 +218,7 @@ def load_and_merge_dir_config( Args: conf_path: Path to configuration directory. patterns: List of glob patterns to match the filenames against. + key: Str of the dictionary keys to access. read_environment_variables: Whether to resolve environment variables. Raises: @@ -282,10 +283,7 @@ def load_and_merge_dir_config( return OmegaConf.to_container( OmegaConf.merge(*aggregate_config, self.runtime_params), resolve=True ) - else: - return OmegaConf.to_container( - OmegaConf.merge(*aggregate_config), resolve=True - ) + return OmegaConf.to_container(OmegaConf.merge(*aggregate_config), resolve=True) def _is_valid_config_path(self, path): """Check if given path is a file path and file type is yaml or json.""" From acbde3ec8e7ab346876bea8cbd35f54fdc6b6c7c Mon Sep 17 00:00:00 2001 From: Nok Chan Date: Tue, 2 May 2023 16:32:24 +0100 Subject: [PATCH 09/15] update release note Signed-off-by: Nok Chan --- RELEASE.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RELEASE.md b/RELEASE.md index e8bcae73cb..240f794a61 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -11,6 +11,9 @@ # Upcoming Release 0.18.9 ## Major features and improvements +* `OmegaConfigLoader` will return a `dict` instead of `DictConfig`. +* `kedro run --params` now update interpolated parameters correctly. + ## Bug fixes and other changes ## Breaking changes to the API ## Upcoming deprecations for Kedro 0.19.0 From 87a51b67f8f2f3d65bbac5c8a30341792ea9c6f8 Mon Sep 17 00:00:00 2001 From: Nok Chan Date: Thu, 4 May 2023 13:56:51 +0100 Subject: [PATCH 10/15] Apply comments and refactor the test Signed-off-by: Nok Chan --- RELEASE.md | 3 +- kedro/config/omegaconf_config.py | 2 +- tests/config/test_omegaconf_config.py | 47 ++++++++++++++++++++------- 3 files changed, 38 insertions(+), 14 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 240f794a61..c9b80d5af9 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -12,7 +12,8 @@ ## Major features and improvements * `OmegaConfigLoader` will return a `dict` instead of `DictConfig`. -* `kedro run --params` now update interpolated parameters correctly. +* `kedro run --params` now update interpolated parameters correctly when using +`OmegaConfigLoader`. ## Bug fixes and other changes ## Breaking changes to the API diff --git a/kedro/config/omegaconf_config.py b/kedro/config/omegaconf_config.py index 1eefa1d196..d601ed3607 100644 --- a/kedro/config/omegaconf_config.py +++ b/kedro/config/omegaconf_config.py @@ -218,7 +218,7 @@ def load_and_merge_dir_config( Args: conf_path: Path to configuration directory. patterns: List of glob patterns to match the filenames against. - key: Str of the dictionary keys to access. + key: Key of the configuration type to fetch. read_environment_variables: Whether to resolve environment variables. Raises: diff --git a/tests/config/test_omegaconf_config.py b/tests/config/test_omegaconf_config.py index c04ef26d35..03335b70b0 100644 --- a/tests/config/test_omegaconf_config.py +++ b/tests/config/test_omegaconf_config.py @@ -70,14 +70,24 @@ def local_config(tmp_path): @pytest.fixture def create_config_dir(tmp_path, base_config, local_config): base_catalog = tmp_path / _BASE_ENV / "catalog.yml" + base_logging = tmp_path / _BASE_ENV / "logging.yml" + base_spark = tmp_path / _BASE_ENV / "spark.yml" + base_catalog = tmp_path / _BASE_ENV / "catalog.yml" + local_catalog = tmp_path / _DEFAULT_RUN_ENV / "catalog.yml" + parameters = tmp_path / _BASE_ENV / "parameters.json" - base_parameters = {"param1": 1, "param2": 2, "templated_param": "${global}"} - base_global_parameters = {"global": "base"} - local_global_parameters = {"global": "local"} + base_parameters = {"param1": 1, "param2": 2, "interpolated_param": "${test_env}"} + base_global_parameters = {"test_env": "base"} + local_global_parameters = {"test_env": "local"} _write_yaml(base_catalog, base_config) _write_yaml(local_catalog, local_config) + + # Empty Config + _write_yaml(base_logging, {"version": 1}) + _write_yaml(base_spark, {"dummy": 1}) + _write_json(parameters, base_parameters) _write_json(tmp_path / _BASE_ENV / "parameters_global.json", base_global_parameters) _write_json( @@ -543,23 +553,36 @@ def test_variable_interpolation_with_correct_env(self, tmp_path): conf = OmegaConfigLoader(str(tmp_path)) params = conf["parameters"] # Making sure it is not override by local/parameters_global.yml - assert params["templated_param"] == "base" + assert params["interpolated_param"] == "base" @use_config_dir def test_runtime_params_override_interpolated_value(self, tmp_path): """Make sure interpolated value is updated correctly with runtime_params""" - conf = OmegaConfigLoader(str(tmp_path), runtime_params={"global": "global"}) + conf = OmegaConfigLoader(str(tmp_path), runtime_params={"test_env": "dummy"}) params = conf["parameters"] - assert params["templated_param"] == "global" + assert params["interpolated_param"] == "dummy" @use_config_dir + @use_credentials_env_variable_yml def test_runtime_params_not_propogate_non_parameters_config(self, tmp_path): - """Make sure `catalog`, `credetials` won't get updated by runtime_params""" + """Make sure `catalog`, `credentials`, `logging` or any config other than + `parameters` are not updated by `runtime_params`.""" # https://github.com/kedro-org/kedro/pull/2467 - conf = OmegaConfigLoader(str(tmp_path), runtime_params={"global": "global"}) - cred = conf["credentials"] + key = "test_env" + runtime_params = {key: "dummy"} + conf = OmegaConfigLoader( + str(tmp_path), + config_patterns={"spark": ["spark*", "spark*/**", "**/spark*"]}, + runtime_params=runtime_params, + ) + parameters = conf["parameters"] catalog = conf["catalog"] + credentials = conf["credentials"] logging = conf["logging"] - assert "global" not in cred - assert "global" not in catalog - assert "global" not in logging + spark = conf["spark"] + + assert key in parameters + assert key not in catalog + assert key not in credentials + assert key not in logging + assert key not in spark From a1b5f0c4a6b5b052e0704ffeff3c63c9862be0f8 Mon Sep 17 00:00:00 2001 From: Nok Lam Chan Date: Thu, 4 May 2023 18:15:28 +0100 Subject: [PATCH 11/15] Update RELEASE.md Co-authored-by: Antony Milne <49395058+antonymilne@users.noreply.github.com> --- RELEASE.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index c9b80d5af9..cc7e0befe0 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -12,8 +12,7 @@ ## Major features and improvements * `OmegaConfigLoader` will return a `dict` instead of `DictConfig`. -* `kedro run --params` now update interpolated parameters correctly when using -`OmegaConfigLoader`. +* `kedro run --params` now updates interpolated parameters correctly when using `OmegaConfigLoader`. ## Bug fixes and other changes ## Breaking changes to the API From 29f62ff0ef43e542d70a4c1df3c56b59c1d8ae53 Mon Sep 17 00:00:00 2001 From: Nok Chan Date: Fri, 5 May 2023 15:30:18 +0100 Subject: [PATCH 12/15] Remove unnecessary condition when len(config) == 1 Signed-off-by: Nok Chan --- kedro/config/omegaconf_config.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/kedro/config/omegaconf_config.py b/kedro/config/omegaconf_config.py index d601ed3607..729b8c277c 100644 --- a/kedro/config/omegaconf_config.py +++ b/kedro/config/omegaconf_config.py @@ -275,8 +275,6 @@ def load_and_merge_dir_config( if not aggregate_config: return {} - if len(aggregate_config) == 1: - return list(aggregate_config)[0] if key == "parameters": # Merge with runtime parameters only for "parameters" From f610010a623dda4a9609e0f8dbd9263e2908b50e Mon Sep 17 00:00:00 2001 From: Nok Chan Date: Fri, 5 May 2023 15:31:01 +0100 Subject: [PATCH 13/15] Update release note Signed-off-by: Nok Chan --- RELEASE.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index c9b80d5af9..38cf7c160d 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -11,11 +11,13 @@ # Upcoming Release 0.18.9 ## Major features and improvements -* `OmegaConfigLoader` will return a `dict` instead of `DictConfig`. + * `kedro run --params` now update interpolated parameters correctly when using `OmegaConfigLoader`. ## Bug fixes and other changes +* `OmegaConfigLoader` will return a `dict` instead of `DictConfig`. + ## Breaking changes to the API ## Upcoming deprecations for Kedro 0.19.0 From 0f7911fb4f8c485bc4b57c7fbcdf59427ccabbda Mon Sep 17 00:00:00 2001 From: Nok Chan Date: Wed, 10 May 2023 23:46:33 +0100 Subject: [PATCH 14/15] Remove unused import Signed-off-by: Nok Chan --- kedro/config/omegaconf_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kedro/config/omegaconf_config.py b/kedro/config/omegaconf_config.py index c03a68da04..285ea1f02d 100644 --- a/kedro/config/omegaconf_config.py +++ b/kedro/config/omegaconf_config.py @@ -10,7 +10,7 @@ from typing import Any, Iterable import fsspec -from omegaconf import DictConfig, OmegaConf +from omegaconf import OmegaConf from omegaconf.resolvers import oc from yaml.parser import ParserError from yaml.scanner import ScannerError From e7d6f6269499f6df812188a3fc0e03f6875f2327 Mon Sep 17 00:00:00 2001 From: Nok Chan Date: Thu, 11 May 2023 11:15:21 +0100 Subject: [PATCH 15/15] remove a line from coverage temporarily Signed-off-by: Nok Chan --- kedro/framework/session/session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kedro/framework/session/session.py b/kedro/framework/session/session.py index bd2b062da5..448dd0612d 100644 --- a/kedro/framework/session/session.py +++ b/kedro/framework/session/session.py @@ -201,7 +201,7 @@ def create( # pylint: disable=too-many-arguments def _get_logging_config(self) -> dict[str, Any]: logging_config = self._get_config_loader()["logging"] if isinstance(logging_config, omegaconf.DictConfig): - logging_config = OmegaConf.to_container(logging_config) + logging_config = OmegaConf.to_container(logging_config) # pragma: no cover # turn relative paths in logging config into absolute path # before initialising loggers logging_config = _convert_paths_to_absolute_posix(