0

I am trying to write test cases for Kedro pipeline. I have params:lr as input for my model training node. Its not being loaded from the parameters of the training pipeline, nor from parameters.yml.

How do I make sure a specific set of parameters are being passed to the kedro pipeline run.

N. Bhattarai
  • 11
  • 1
  • 3
  • How are you running your pipeline for your test case? You can pass parameters to `kedro run` using the `--params` argument (see https://kedro.readthedocs.io/en/0.17.5/09_development/03_commands_reference.html?#modifying-a-kedro-run). For an end-to-end test like this, I often use the Behave BDD testing framework (as does Kedro). Alternatively, if you're constructing and running a pipeline programmatically in pytest (how long does your pipeline take? if longer than a few seconds, is it really wise for this to be a unit test?), you can modify your catalog, in the way Kedro handles `extra_params`. – deepyaman Nov 08 '21 at 22:25
  • 2
    Please provide enough code so others can better understand or reproduce the problem. – Community Nov 09 '21 at 11:04

1 Answers1

2

Agree with Deepyaman , you can do something like this : https://kedro.readthedocs.io/en/0.16.1/04_user_guide/03_configuration.html ---> Specifying parameters at runtime

Do check the Loading section to see if you are passing the parameters in yml accordingly or not.

Dharman
  • 30,962
  • 25
  • 85
  • 135