Skip to content
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

Interactive Widgets Broken due to Dependecies #323

Closed
michal-g opened this issue Nov 28, 2023 · 2 comments
Closed

Interactive Widgets Broken due to Dependecies #323

michal-g opened this issue Nov 28, 2023 · 2 comments
Assignees

Comments

@michal-g
Copy link
Collaborator

We are once again facing issues getting the interactive widgets used in the demo Jupyter notebooks to display properly. For example, when running the EMPIAR-10076 tutorial, the filtering notebook shows this error message at cell 52 in Jupyter Lab:

Screenshot 2023-11-28 at 12 26 58 PM

We previously encountered the same issue but were able to solve it by including explicit conda install statements in the installation instructions in #34. However, this didn't solve all the issues (#137, #276) and so we ended up pinning the version of ipywidgets to <8 in #138 and also moved away from installing dependencies in this way (#146), instead specifying them in pyproject.toml. However users are still sometimes running into this problem, and even finding workarounds that don't involve a forced downgrading of ipywidgets, see e.g. #153 and #305.

There is clearly incompatibility between some versions of jupyter and some versions of plotly used for the interactive widget, and both our implicit and explicit ways of avoiding this incompatibility have failed so far. Possible solutions are:

  1. Update the list of dependencies in pyproject.toml to more specifically avoid this incompatibility.
  2. Use a different way of specifying dependencies that is more specific, e.g. providing a full conda environment list for users to install from as Guillawme describes here.
  3. Use a different package for the widgets that is less sensitive to dependency issues.
@michal-g michal-g self-assigned this Nov 28, 2023
@michal-g
Copy link
Collaborator Author

Additionally, we should add a test (run either upon commit or upon installation) for checking whether the widgets are failing silently!

@michal-g michal-g mentioned this issue Dec 19, 2023
@michal-g
Copy link
Collaborator Author

in the latest release v3.1.0b we have solved this by creating a new interactive filtering interface cryodrgn filter that relies solely on matplotlib — it is anyhow better to have a separate way of accessing this functionality without having to rely on the cells towards the end of a Jupyter notebook, which is prone to bugs even without the aforementioned issues with jupyterlab dependencies

the interactive widget cells in the notebook will be kept in as some people can still get them to work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant