Clay Smyth
10/02/2023, 6:50 PMJuan Luis
10/03/2023, 6:53 AMClay Smyth
10/03/2023, 4:59 PMfmfreeze
11/24/2023, 10:07 AMKedroSession
object and the ipython/notebook session
object?--params=key:value
). That is possible via params
argument of a KedroSession
but not via an ipython session
object?Juan Luis
11/24/2023, 10:18 AMfmfreeze
11/24/2023, 11:00 AMKedroSession
object and the ipython/notebook session
object?
And how does one implement parameter overriding programmatically?
According to @Juan Luis’s link above
the instructions have changed a bit since 2021:
https://docs.kedro.org/en/stable/kedro_project_setup/session.html#create-a-sessionit is possible to set
runtime_params
via params
argument of a KedroSession
, but that is not documented for not via an ipython session
object.
(see https://docs.kedro.org/en/latest/notebooks_and_ipython/kedro_and_notebooks.html#session)
I tried with the latest kedro release (0.18.14) and an ipython session
seems to be a kedro.framework.session.KedroSession
object.
But this has no argument like params
, extra_params
or runtime_params
to override yaml config parameters, like one could do with CLI usage (e.g. kedro run --params=key:value
).Lukas Innig
11/24/2023, 11:11 AMfmfreeze
11/24/2023, 11:20 AMYou would put the params into the %reload_kedro call when working in a notebookthank you, with your hook I found it here: https://docs.kedro.org/en/stable/kedro.ipython.magic_reload_kedro.html remains the question: how does it work with the pure python mechanism?
bootstrap_project(Path.cwd())
with KedroSession.create() as session:
session.run()
KedroSession.create()
does have the argument extra_params
to pass a dictionary to inject parameters at runtime.
My fault, i hope this helps future readers.Nok Lam Chan
11/25/2023, 7:54 AM