Giter Site home page Giter Site logo

Comments (11)

aylward avatar aylward commented on July 23, 2024 1

Thank you for the detailed report on the itkwidget repo. Matt and Brianna are looking into it!

from tutorials.

thewtex avatar thewtex commented on July 23, 2024 1

Hello ๐Ÿ‘‹ ,

With itkwidgets 1.0a50, itkwidgets supports JupyterLab 4 and Jupyter Notebook 7. The Jupyter project made these versions major breaking changes. So, there are a few approaches:

a) Update the JupyterLab and Jupyter Notebook version
b) Set the itkwidgets dependency to itkwidgets==1.0a49 until a) can be performed.

After install itkwidgets[notebook]>=1.0a49, look like there will be a requirement compatibility issues for pandas, not sure whether it's related the issue.

This seems to be unrelated in the transitive dependency arena, but a patch is here:

InsightSoftwareConsortium/itkwidgets#744

Testing and feedback to see if it addresses your use cause are appreciated. ๐Ÿ™ Thanks!

from tutorials.

KumoLiu avatar KumoLiu commented on July 23, 2024 1

Hi @thewtex, thanks for the quick response.
I update the notebook version but the same issue occurred.
Step to reproduce:

docker run -it --ipc=host --rm --net host --gpus all  nvcr.io/nvidia/pytorch:24.03-py3
pip install -U notebook
Then run this notebook: https://github.com/InsightSoftwareConsortium/itkwidgets/blob/v1.0a50/examples/integrations/MONAI/transform_visualization.ipynb

You can see from the screen shot after view even import numpy as not be executed. Also can see the output from view.
Screen Shot 2024-04-17 at 23 54 21

BTW, where can I find the requirement for the notebook, I didn't find it in the requirement. Perhaps I want to try the version which can run in notebook 6.
Thanks!

from tutorials.

thewtex avatar thewtex commented on July 23, 2024 1

Hi @KumoLiu , these improvements have now been released in itkwidgets 1.0a51.

Please try:

docker run -it --ipc=host --rm --net host --gpus all  nvcr.io/nvidia/pytorch:24.03-py3
pip install -U notebook
pip install 'itkwidgets[notebook]==1.0a51'
# Start the notebook

from tutorials.

KumoLiu avatar KumoLiu commented on July 23, 2024

cc @kirbyju @aylward and @thewtex, in case you can shed any light on this issue, it would be greatly appreciated.

Also created a ticket here InsightSoftwareConsortium/itkwidgets#743
Thanks.

from tutorials.

KumoLiu avatar KumoLiu commented on July 23, 2024

Also tried this notebook with pytorch container: nvcr.io/nvidia/pytorch:24.03-py3.
See the same issue.
https://github.com/InsightSoftwareConsortium/itkwidgets/blob/v1.0a50/examples/integrations/MONAI/transform_visualization.ipynb

from tutorials.

thewtex avatar thewtex commented on July 23, 2024

@KumoLiu thanks for the reproducible example!

Addressed here:

InsightSoftwareConsortium/itkwidgets#745

After it is released, it will be better to install itkwidgets in the containers so all javascript is loaded at startup.

from tutorials.

thewtex avatar thewtex commented on July 23, 2024

BTW, where can I find the requirement for the notebook, I didn't find it in the requirement. Perhaps I want to try the version which can run in notebook 6.

The dependencies are here:

https://github.com/InsightSoftwareConsortium/itkwidgets/blob/5d83f28c4c076e6227ff4434484e105d57614aa8/pyproject.toml#L37-L92

We keep them as small and light and universal as possible.

from tutorials.

KumoLiu avatar KumoLiu commented on July 23, 2024

Hi @thewtex, thanks for the quick fix.
I tried with 1.0a51, and the same issue occurred.
In addition, after this command pip install 'itkwidgets[notebook]==1.0a51' and jupyter notebook can not even launched correctly.
Screen Shot 2024-04-18 at 11 29 37

from tutorials.

thewtex avatar thewtex commented on July 23, 2024

@KumoLiu thanks for testing.

I also observed that error in my testing when I tried installing widgetsnbextension (a different, unrelated package), made for notebook==6 when notebook==7 was installed.

I am wondering if there is something else in your installation?

Could you please try:

docker run -it -p 8888:8888 --ipc=host --rm --net host --gpus all thewtex/monai-1694

or simply build and run the following Dockerfile:

FROM nvcr.io/nvidia/pytorch:24.03-py3

RUN pip install -U notebook
RUN pip install 'itkwidgets[notebook]==1.0a51'
RUN curl -L -o /transform_visualization.ipynb https://raw.github.com/InsightSoftwareConsortium/itkwidgets/main/examples/integrations/MONAI/transform_visualization.ipynb
CMD jupyter notebook /transform_visualization.ipynb

?

You should see:

image

(there is an issue with the last cell, but I have a fix in progress for that).

from tutorials.

thewtex avatar thewtex commented on July 23, 2024

(there is an issue with the last cell, but I have a fix in progress for that).

This was a side-effect of fixing the pandas dependency issue, but it has been addressed in itkwidgets 1.0a52.

from tutorials.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.