-
Notifications
You must be signed in to change notification settings - Fork 934
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
%load_node does not work with notebook>=7.2.0 #4369
Comments
Thank you for reporting this @marrrcin ! We'll have somebody else on the team try to reproduce this. |
Thanks, @marrrcin. I confirm that starting from Notebook 7.2.0, this feature stopped working. It creates notebook cells, but they are empty instead of containing the node code. |
After some digging, it appears that a recent change to Jupyter Notebook (version 7.2 and above) introduced a feature called “Full notebook windowing mode” which is now enabled by default: This mode virtualises how cells are rendered, so only visible cells are injected into the DOM. As a result, any extension or magic command that relies on inserting new cells (e.g. via DOM manipulation or ipylab commands) may fail silently or have broken behavior. In our case, the Workaround / Solution: We can actually revert to the older behaviour through settings on jupyter notebook, change the “Windowing mode” setting from “full” to “defer.”:
![]() This should allows the @DimedS @astrojuanlu @merelcht should we look into how to set this globally or programmatically or maybe just update our docs? |
Ugh, that's really unfortunate... Thanks for digging @SajidAlamQB , this is helpful! IMHO, if it doesn't work with the default settings it's unfortunately broken. Can we maybe rework the feature so that instead of inserting new cells, it writes everything to the current one? |
I like that proposal. It might also be possible to switch off the |
This solution could work, we would need to temporarily change the windowing mode to "defer" before running the cell creation commands, then restore it afterward. It will maintain compatibility with all notebook versions and doesn't require users to manually change settings and keeps the default option albeit a little bit hacky. |
looks like easiest solution if it will work |
@astrojuanlu @DimedS, I've tried playing around with switching the windowing mode programatically, but its a lot more complex than I anticipated I think @astrojuanlu initial suggestion of inserting it all into one is easiest. I have a PR that checks if the user is running |
Thanks for investigating! I'd even go as far as saying that we make this consistent for all |
Coming here from jtpio/ipylab#136. Interesting to see how the So it may still be something to investigate in |
Hey @jtpio , thanks for chiming in! Indeed, @SajidAlamQB 's investigations point to a bad interaction between ipylab and the windowing mode. We did find a workaround but slightly changing how our command works, but if we can help in any way, let us know! |
Sure, thanks! I guess this can be investigated as part of jtpio/ipylab#136. Activity on |
Description
Based on the latest guide on
main
branch I've tried running notebook with Kedro kernel. While most of the functionality seems OK, the%load_node
feature does not seem to work correctly.Context
Not being able to use
%load_node
in Jupyter Notebook with Kedro loaded.Steps to Reproduce
main
branchkedro jupyter notebook
%load_node split_data_node
Expected Result
Function works properly as with

notebook==7.1.2
.Actual Result
Additional info
Works fine when version of
notebook
is pinned to7.1.2
. I did not do bisection between7.1.2
and7.3.1
to find where it broke though.Your Environment
pip show kedro
orkedro -V
):0.19.10
python -V
):Python 3.10.10
The text was updated successfully, but these errors were encountered: