Andrew Doherty
07/06/2023, 2:08 PMkedro=0.18.7
). When running from the CLI I would like to pass the location of the parameters file. From the documentation I believe I should be able to run:
kedro run --pipeline=namespace_1 --config=<config_file_name>.yml
However, when I run this I get KeyError: 'run'
(traceback in thread). Is there a way to use --config
with namespace pippelines?
The alternative is to create a copy of the conf
folder and use the following:
kedro run --pipeline=namespace_1 --conf-source=moved_params
This works but the first option where we only override the single parameter file would be much neater for our purpose.
Thanks again.╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/andrew/code_dev/kedro_namespace_example/kedro_neptune_namespace_issue/.venv/bin/kedro:8 │
│ in <module> │
│ │
│ /Users/andrew/code_dev/kedro_namespace_example/kedro_neptune_namespace_issue/.venv/lib/python3.9 │
│ /site-packages/kedro/framework/cli/cli.py:211 in main │
│ │
│ 208 │ """ │
│ 209 │ _init_plugins() │
│ 210 │ cli_collection = KedroCLI(project_path=Path.cwd()) │
│ ❱ 211 │ cli_collection() │
│ 212 │
│ │
│ /Users/andrew/code_dev/kedro_namespace_example/kedro_neptune_namespace_issue/.venv/lib/python3.9 │
│ /site-packages/click/core.py:1130 in __call__ │
│ │
│ /Users/andrew/code_dev/kedro_namespace_example/kedro_neptune_namespace_issue/.venv/lib/python3.9 │
│ /site-packages/kedro/framework/cli/cli.py:139 in main │
│ │
│ 136 │ │ ) │
│ 137 │ │ │
│ 138 │ │ try: │
│ ❱ 139 │ │ │ super().main( │
│ 140 │ │ │ │ args=args, │
│ 141 │ │ │ │ prog_name=prog_name, │
│ 142 │ │ │ │ complete_var=complete_var, │
│ │
│ /Users/andrew/code_dev/kedro_namespace_example/kedro_neptune_namespace_issue/.venv/lib/python3.9 │
│ /site-packages/click/core.py:1055 in main │
│ │
│ /Users/andrew/code_dev/kedro_namespace_example/kedro_neptune_namespace_issue/.venv/lib/python3.9 │
│ /site-packages/click/core.py:1655 in invoke │
│ │
│ /Users/andrew/code_dev/kedro_namespace_example/kedro_neptune_namespace_issue/.venv/lib/python3.9 │
│ /site-packages/click/core.py:920 in make_context │
│ │
│ /Users/andrew/code_dev/kedro_namespace_example/kedro_neptune_namespace_issue/.venv/lib/python3.9 │
│ /site-packages/click/core.py:1378 in parse_args │
│ │
│ /Users/andrew/code_dev/kedro_namespace_example/kedro_neptune_namespace_issue/.venv/lib/python3.9 │
│ /site-packages/click/core.py:2360 in handle_parse_result │
│ │
│ /Users/andrew/code_dev/kedro_namespace_example/kedro_neptune_namespace_issue/.venv/lib/python3.9 │
│ /site-packages/click/core.py:2322 in process_value │
│ │
│ /Users/andrew/code_dev/kedro_namespace_example/kedro_neptune_namespace_issue/.venv/lib/python3.9 │
│ /site-packages/kedro/framework/cli/utils.py:414 in _config_file_callback │
│ │
│ 411 │ section = ctx.info_name │
│ 412 │ │
│ 413 │ if value: │
│ ❱ 414 │ │ config = anyconfig.load(value)[section] │
│ 415 │ │ ctx.default_map.update(config) │
│ 416 │ │
│ 417 │ return value │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
KeyError: 'run'
datajoely
07/06/2023, 2:39 PMAndrew Doherty
07/06/2023, 3:14 PMkedro run --pipeline=namespace_1
kedro run --pipeline=namespace_1 --config=/Users/andrew/code_dev/moved_params/base/parameters/parameters.yml
datajoely
07/06/2023, 3:14 PMAndrew Doherty
07/06/2023, 3:15 PM--conf-source=moved_params
along with Neptune. neptune.yml
and credentials_neptune.yml
are still required in conf/base
and are not taken from --conf-source
.datajoely
07/07/2023, 12:53 PM