Hello everyone, I have a question concerning param...
# questions
c
Hello everyone, I have a question concerning parameters. In a project I’m working on we are using Kedro framework. We are developing several pipelines and we would like to create different parameter files for simplicity. Indeed, as we are using a lot of different parameters for different pipelines, the parameters file can become quickly messy. I was wondering if there was a way to keep using the parameter system of Kedro for calling parameters with «
params
», but using a file different from the default
parameters.yml
file. Here is what I have in mind based on one of the documentation examples:
Copy code
from kedro.config import ConfigLoader
from kedro.framework.project import settings

conf_path = str(project_path / settings.CONF_SOURCE)
conf_loader = ConfigLoader(conf_source=conf_path, env="local")

params = conf_loader.get(« other_parameters_file.yml")

# in node definition
def increase_volume(volume, step):
  return volume + step

# in pipeline definition
node(
  func=increase_volume,
  inputs=["input_volume", "params:step_size"],
  outputs="output_volume",
)
And the parameter
step_size
would be in the
other_parameters_file.yml.
My question is to know whether it is feasible with kedro to do that ? If so, how should it be done ? Thanks a lot for your help !
f
You can add the
other_parameters_file.yml
in a
parameters
folder (in --say--
conf/base
), and it should be found if you use the standard config loader configuration
👍 1
c
Thanks for your quick answer, I'll try that !