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
I can't use same high-level keys in two different parameters.yaml files for namespacing even though they have separate sub-namespace.
Context
I am trying to namespace my subpipelines and create parameters for these subpipelines separately in their respective parameters files. Since in above example both the subpipelines belonged to pipeline1, I want the parameters for both to start with pipeline1.subpipeline1_x. And in case I wanted all params for pipeline1 I can easily grab using params:pipeline1.
This should ideally not throw an error and if I want params:pipeline1 it should be a merge dict based on both of these configs.
Actual Result
Traceback (most recent call last):
File "/Users/Puneet_Saini/anaconda3/envs/project/lib/python3.9/site-packages/IPython/core/shellapp.py", line 282, in init_extensions
self.shell.extension_manager.load_extension(ext)
File "/Users/Puneet_Saini/anaconda3/envs/project/lib/python3.9/site-packages/IPython/core/extensions.py", line 76, in load_extension
return self._load_extension(module_str)
File "/Users/Puneet_Saini/anaconda3/envs/project/lib/python3.9/site-packages/IPython/core/extensions.py", line 93, in _load_extension
if self._call_load_ipython_extension(mod):
File "/Users/Puneet_Saini/anaconda3/envs/project/lib/python3.9/site-packages/IPython/core/extensions.py", line 145, in _call_load_ipython_extension
mod.load_ipython_extension(self.shell)
File "/Users/Puneet_Saini/anaconda3/envs/project/lib/python3.9/site-packages/kedro/ipython/__init__.py", line 62, in load_ipython_extension
reload_kedro()
File "/Users/Puneet_Saini/anaconda3/envs/project/lib/python3.9/site-packages/kedro/ipython/__init__.py", line 123, in reload_kedro
catalog = context.catalog
File "/Users/Puneet_Saini/anaconda3/envs/project/lib/python3.9/site-packages/kedro/framework/context/context.py", line 187, in catalog
return self._get_catalog()
File "/Users/Puneet_Saini/anaconda3/envs/project/lib/python3.9/site-packages/kedro/framework/context/context.py", line 238, in _get_catalog
feed_dict = self._get_feed_dict()
File "/Users/Puneet_Saini/anaconda3/envs/project/lib/python3.9/site-packages/kedro/framework/context/context.py", line 253, in _get_feed_dict
params = self.params
File "/Users/Puneet_Saini/anaconda3/envs/project/lib/python3.9/site-packages/kedro/framework/context/context.py", line 198, in params
params = self.config_loader["parameters"]
File "/Users/Puneet_Saini/anaconda3/envs/project/lib/python3.9/site-packages/kedro/config/omegaconf_config.py", line 199, in __getitem__
base_config = self.load_and_merge_dir_config( # type: ignore[no-untyped-call]
File "/Users/Puneet_Saini/anaconda3/envs/project/lib/python3.9/site-packages/kedro/config/omegaconf_config.py", line 326, in load_and_merge_dir_config
self._check_duplicates(seen_file_to_keys)
File "/Users/Puneet_Saini/anaconda3/envs/project/lib/python3.9/site-packages/kedro/config/omegaconf_config.py", line 433, in _check_duplicates
raise ValueError(f"{dup_str}")
ValueError: Duplicate keys found in /Users/Puneet_Saini/repos/project/conf/base/pipeline1/subpipeline1_1/parameters.yaml and /Users/Puneet_Saini/repos/project/conf/base/pipeline1/subpipeline1_2/parameters.yaml: pipeline1
Your Environment
Kedro version used (pip show kedro or kedro -V): 0.19.3
puneeter
changed the title
Can't use same keys in two different parameters.yaml
Can't use same top-level keys in two different parameters.yaml
Aug 15, 2024
Description
I can't use same high-level keys in two different parameters.yaml files for namespacing even though they have separate sub-namespace.
Context
I am trying to namespace my subpipelines and create parameters for these subpipelines separately in their respective parameters files. Since in above example both the subpipelines belonged to
pipeline1
, I want the parameters for both to start withpipeline1.subpipeline1_x
. And in case I wanted all params forpipeline1
I can easily grab usingparams:pipeline1
.Steps to Reproduce
Expected Result
This should ideally not throw an error and if I want
params:pipeline1
it should be a merge dict based on both of these configs.Actual Result
Your Environment
pip show kedro
orkedro -V
): 0.19.3python -V
): 3.9.19Link to discussion: https://kedro-org.slack.com/archives/C03RKP2LW64/p1723193517960259
The text was updated successfully, but these errors were encountered: