kedro.framework.session.session.get_current_session

kedro.framework.session.session.get_current_session(silent=False)[source]

Fetch the active KedroSession instance.

Parameters

silent (bool) – Indicates to suppress the error if no active session was found.

Raises

RuntimeError – If no active session was found and silent is False.

Return type

Optional[KedroSession]

Returns

KedroSession instance.