Bibo Bobo
02/17/2025, 9:48 AMKedroContext
properly?
I want to add a --only-missing
CLI parameter to kedro run
so that it runs pipelines using the run_only_missing
method. From what I understand, adding this parameter to the default CLI was rejected because it can be implemented via KedroContext
customization.
However, I’m not sure how to do this correctly. Or maybe I am missing something 😔
Could someone share an example or a code snippet because I don't see the usage of this class in the docs (e.g. here or here)?Hall
02/17/2025, 9:48 AMElena Khaustova
02/17/2025, 10:35 AMSESSION_STORE_CLASS
in the settings.py
But I don’t think it can help with injecting --only-missing
CLI parameter to kedro run
. In session.run
default runner.run
method is used and what you need is to call runner.run_only_missing
instead.
The easiest way to do it is by calling it from runner directly: https://docs.kedro.org/en/stable/nodes_and_pipelines/run_a_pipeline.html#run-pipelines-with-ioBibo Bobo
02/17/2025, 11:39 AMsession.run
? I mean I would like to have other parameters processed as-is and don't think it is a good idea to copy-paste the code from the default implementation but if there is some simple way to extend the default logic with something like
if config.only_missing:
SequentialRunner().run_only_missing(...)
else:
# do usual stuff...
it would be greatElena Khaustova
02/17/2025, 12:02 PMsession.run
. You could do this by modifying source code though and building kedro from source.
To do it externally you’ll have to go from runner. Maybe you can extend your project with a command that calls kedro run
if --only_missing
is not provided and SequentialRunner().run_only_missing(...)
otherwise.