-
Notifications
You must be signed in to change notification settings - Fork 114
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
%run_viz line magic requires session.close first #811
Comments
If no one has complained for that long than yeah, let's remove it and deprecate the feature. |
Interesting internal slack thread showing that some people try to use It looks like on databricks |
This issue is also mentioned here #737 |
The original bug is fixed in Kedro 0.18.1. The other bugs and question of whether to keep |
Description
Running
%run_viz
from within akedro ipython
or jupyter instance will raise an exception "Cannot activate the session as another active session already exists".After some sleuthing and testing I decided that this bug has existed since kedro-viz 4.0.0 (26 Oct 2021) and was caused by PR #603, which was itself trying to fix some error with no active session.
_activate_session
is called only when using the kedro session as a context manager (which is why this wasn't a problem in older kedro-viz versions) and raises the error.Workaround
Call
session.close()
in your ipython instance before doing%run_viz
.Possible solutions
If we get rid of the
_active_session
stuff like @idanov suggests then this would be fixed straight away by a change on the kedro framework side. If we don't then we can probably fix on the viz side somehow (go back to not using the context manager I guess).Should we remove
%run_viz
altogether?I was already questioning in kedro-org/kedro#1355 whether anyone used
%run_viz
. The fact that it's had this major bug for nearly 6 months and no one said anything is quite a strong piece of evidence... If we do want to keep it then we should at some point also consider the (very small) bug that I mentioned there though:The text was updated successfully, but these errors were encountered: