-
Notifications
You must be signed in to change notification settings - Fork 226
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
Incompatibilities between patch versions when installed in both server and kernel environment #416
Comments
Thanks for the detailed report :) Indeed, when the versions don't match it will fail to render (even if, in some cases, it could technically work). This check is being done by the ipywidgets's JupyterLab Widget Manager. Currently we have a:
Technically, we should also have a "model version", a version of some kind of protocol that the back-end/front-end speaks. I think this would be the cleanest way of doing it (and it is possible to do that with ipywidgets), but I don't know any widget which does that. I am personally totally open to start doing this. Although I am not sure what the transition would look like, and it would not affect old ipympl versions. |
We would bump such "model version" only if there is a breaking change in the widget model (e.g. if we rename a widget property in the model). It's a bit more maintenance pain but it might be worth it. It might actually reduce the number of issues "it fails to render in JupyterLab with model not found" that we see popping on all widgets libs. |
Agreed I think it would.
I agree that this is good. But I think the only example is actually ipywidgets itself: |
Document a work-around to get `ipympl` widgets to work on NERSC's Jupyter service. Also x-ref the upstream issue: matplotlib/ipympl#416
Document a work-around to get `ipympl` widgets to work on NERSC's Jupyter service. Also x-ref the upstream issue: matplotlib/ipympl#416
We actually already have some of the infrastructure for this. I think that so long as: Line 3 in 6a7c2ba
matches these: Lines 33 to 34 in 6a7c2ba
then things should work. So we need to decouple that number from the package versioning. This is what ipywidgets does: https://github.com/jupyter-widgets/ipywidgets/blob/88cec8be2869e75760a6a99bba129e6011d9043f/python/ipywidgets/ipywidgets/_version.py So I propose that we take the current protocol version and call it |
oh actually, changing it is worse. We should leave it exactly the same until we actually change the protocol. So we should decouple |
I'll try this as a follow up to #446 and then on release we can see if the situation improved. Then we can leave extensive comments to that effect and/or add this as docs to contributing guide (and to ipywidgets) so we know what to do in the future. |
Yes! Also making this version Happy to give it a review! |
I think this will have been fixed going forward by #448 but let's definitely reopen if we discover that it was not |
I have this same issue at the moment. I don't know what version of ipympl is installed on the server side. Is anyone else still facing the issue? |
This issue was originally discussed in #34 but I now see this is a distinct issue.
If a jupyterlab user wants to make use of a custom kernel and use ipympl in their notebooks, then ipympl must be installed in both the jupyterlab environment and their kernel environment. If different versions of ipympl are installed in the jupyterlab environment and kernel environments, then sometimes ipympl breaks even for differences in the patch version. If jupyterlab is running within a multi-user environment (jupyterhub) and the user does not control the server, then the user may not know what version of ipympl is installed in the jupyterlab environment. This can make it difficult for users to determine the version of ipympl they need to install in their kernels. Additionally, the kernel environments are likely to break when upgrades occur to ipympl in the jupyterlab environment.
Test setup
The test were run using 6 builds of the following Dockerfile, where LAB_IPYMPL_VERSION modified for each build.
For each build-kernel pair, I ran the following in a notebook:
After selecting the kernel for the next test, I performed a 'Empty Cache and Hard Reload' with the the Chrome web browser.
Versions
Here is the version info for the test when ipympl v0.8.0 was installed in the jupyterlab environment:
For the other tests, all these values except for the ipympl version and the jupyter-matplotlib remained constant. jupyter-matplotlib was never directly installed, it always came from the installation of ipympl.
Results
I ran a series of tests to determine which combinations of the ipympl v0.8.x packages are functional when installed in both the jupyterlab environment and the kernel environment. Three different outputs occurred:
The results are summarized in this table:
Conclusions
ipympl is fragile when installed in kernels in a different environment from the jupyterlab environment. It would be great if in these types of setups, ipympl was compatible with itself across patch versions (ie, within the v0.8.x series).
Thanks!
Sorry this was so long. This module is an important and appreciated part of my workflows. Thanks you!
The text was updated successfully, but these errors were encountered: