Hey Kedro users, A quick question about how parame...
# questions
l
Hey Kedro users, A quick question about how parameters are handled in Kedro. I know I can use parameters defined in
parameters/xxx.yml
to then pass those parameters as input of node. My question is : is there a "Kedro way" to also access those parameters in the
pipeline.py
file to create the node ? My purpose is to build nodes based on a parameter defined in this yml file Cheers !
h
Someone will reply to you shortly. In the meantime, this might help:
p
Hi, does this answer your question ?
Copy code
from kedro.config import OmegaConfigLoader
from kedro.framework.project import settings
Copy code
conf_path = str(project_path / settings.CONF_SOURCE)
conf_loader = OmegaConfigLoader(conf_source=conf_path)
parameters = conf_loader["parameters"]
Put that in a pipeline.py file, as shown here https://docs.kedro.org/en/stable/configuration/parameters.html
l
That's exactly what I was looking for thx