Lino Fernandes
03/10/2025, 4:37 PMconf
& dev
for local and dev deployments, respectively). I'm trying to switch between these using the CLI flag (e.g., kedro run --conf-source dev
and kedro run --conf-source conf
but kedro seems to always default to using conf
unless I specify CONF_SOURCE = "dev"
in the settings.py
file.
Am I doing something wrong?Hall
03/10/2025, 4:37 PMdatajoely
03/10/2025, 4:40 PMkedro run --env dev
datajoely
03/10/2025, 4:40 PMkedro run --conf-source
datajoely
03/10/2025, 4:40 PMLino Fernandes
03/10/2025, 4:53 PMCONF_SOURCE
in settings.py
?datajoely
03/10/2025, 4:56 PM├── conf
│ ├── base
│ │ └── parameters
│ ├── dev
│ ├── local
│ ├── prod
│ ├── stg
│ ├── test1
│ └── test2
those are called configuration environments
so if you run kedro run --env dev
it will take the conf/dev
folder as the place to get config from
The CONF_SOURCE
directory in settings.py
is designed to tell kedro to look for the conf/
folder at the top.
kedro run --conf-source path/to/folder or path/to/archive.zip
does something slightly different and is designed for packagingdatajoely
03/10/2025, 4:56 PMMerel
03/10/2025, 5:00 PMsettings.py
or at least it should.Merel
03/10/2025, 5:01 PMMerel
03/10/2025, 5:01 PM--conf-source
expects the path to a directory containing configurationLino Fernandes
03/10/2025, 5:05 PMconf/
configuration even if I pass a full path (e.g., kedro run --conf-source /Users/lino_fernandes/<path-to-kedro-project>/dev
Merel
03/10/2025, 5:12 PMLino Fernandes
03/10/2025, 5:27 PMMissingConfigException: Given configuration path either does not exist or is not a valid directory: /Users/lino_fernandes/<path-to-kedro-project>/data/base
Ravi Kumar Pilla
03/10/2025, 9:01 PMkedro run
picks the conf-source specified. I created a custom_conf
directory at my kedro project root and did kedro run --conf-source custom_conf
. And my settings.py only has -
from kedro.config import OmegaConfigLoader
CONFIG_LOADER_CLASS = OmegaConfigLoader
Merel
03/11/2025, 8:40 AMLino Fernandes
03/11/2025, 10:50 AMnodes.py
to get some credentials. When I create a new instance of the conf_loader it always defaults to conf/
. I guess this was just not the cleanest implementation from my side.
Anyway, it works fine if I specify CONF_SOURCE
in settings.py
.Merel
03/11/2025, 11:10 AM