-
Notifications
You must be signed in to change notification settings - Fork 903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Technical design decision record for KedroSession
#1335
Comments
KedroSession
technical design decision based on https://github.com/kedro-org/kedro/issues/1273KedroSession
A question that I think myself and others will ask is - if I want to access the data catalog as a live object, do I need to create a session for that? Is that the right way? |
The |
@MerelTheisenQB I get that - but users will need to access it in other contexts such as plug-ins and (although not recommended) dynamic contexts. Is there scope to make the catalog importable like the pipelines object is? |
@datajoely Personally I would like this (unless there's some strong arguments against it that I've forgotten), but I think it's outside the scope for now at least. When we talked about it before it didn't seem as easy to do as it is for Just one comment on kedro session in the interactive workflow: eventually I wonder whether we should stop exposing My immediate concern is that someone could end up saving to the session store sessions when they are not even doing More generally though, I wonder whether there will be any good uses of |
@AntonyMilneQB For me, it's the ability to do checkpoint debugging in an interactive environment that matters. It may be I am not doing it in a right way, but I am interested in how others are using the Kedro Ipython/notebook other than EDA. Just to recap, this is the workflow that I adopted in the past for development.
|
@AntonyMilneQB I think not being able to run anything in the jupyter notebook / ipython takes away a lot from jupyter users we're trying to convert to Python and Kedro. If we do that we need to seriously consider the consequences and clearly draw the boundaries of our target audience, because it sounds like they would be very different. |
KedroSession
KedroSession
Closing this as there's no immediate actions remaining for this issue. |
The
KedroSession
✨The
KedroSession
is the object responsible for managing the lifecycle of a Kedro run. It has two main functions:KedroSession
offers a way to persist run data through the session store. The following data gets saved in the session store:Usage within Kedro 🏗
The
KedroSession
is a relatively new component within Kedro and at the time of writing, is mainly used to manage run lifecycles and for experiment tracking. The experiment tracking feature makes use of a session store implementation called theSQLiteStore
, which uses SQLite to persist data. Other implementations of the session store available in Kedro are:BaseSessionStore
: the base class for all session stores that doesn’t persist any dataShelveStore
: implementation that uses the shelve package to persist dataRelation of a
run
and asession
🧑🤝🧑While working on #1273 it was decided that Kedro session and Kedro run have a 1-1 mapping. This means that when a session gets created it will only ever be possible to kick off one full pipeline run during that specific session’s existence. In practice, Kedro manages this for you under the hood when
kedro run
is executed.FAQ ❓
How does a Kedro user use KedroSession?
As a Kedro user you don’t need to access the session directly. When you execute the
kedro run
command, a new session gets created automatically. This session will then kick off the pipeline run and when that process finishes, the session will be closed again persisting any run data if the project is configured with a persistent session store.What about using KedroSession in an interactive workflow?
When using jupyter or ipython you can access the active
session
object or create a new one. You can then retrieve thesession_id
, the run data that will be stored, load the context, and execute a run. However, we do not encourage users to use the session other than for checking thesession_id
and run data.Related Github issues and PRs:
1 session = 1 run
#1329session == run
decision kedro-viz#764The text was updated successfully, but these errors were encountered: