Project-MONAI / Project-MONAI/tutorials

Kernel hangs in "TCIA_PROSTATEx_Prostate_MRI_Anatomy_Model.ipynb"

Open
#1,694 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
2.5k
Forks
803
Avg merge
6d 22h
Merged PRs (30d)
3

Description

Describe the bug
Kernel hangs after itkwidgets visualization in jupyter notebook
https://github.com/Project-MONAI/tutorials/blob/main/model_zoo/TCIA_PROSTATEx_Prostate_MRI_Anatomy_Model.ipynb

To Reproduce

  1. docker pull projectmonai/monai:latest
  2. create a new container
  3. run into container
  4. pip install 'itkwidgets[notebook]>=1.0a49'
from monai.transforms import LoadImage
root_dir = "/opt/monai/workspace/Data"
data_dir = os.path.join(root_dir, "Task09_Spleen")
train_images = sorted(glob.glob(os.path.join(data_dir, "imagesTr", "*.nii.gz")))
out = LoadImage(ensure_channel_first=True)(train_images[0])
view(image=out)

Expected behavior
Kernal will not hangs after using view.

Screenshots
Screen Shot 2024-04-17 at 15 46 44

Additional context

Collecting pandas>=2.0.0 (from dask-image->ngff-zarr[dask-image]>=0.4.3->itkwidgets>=1.0a49->itkwidgets[notebook]>=1.0a49)
  Downloading pandas-2.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (19 kB)
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
cudf 24.2.0 requires pandas<1.6.0dev0,>=1.3, but you have pandas 2.2.2 which is incompatible.
dask-cuda 24.2.0 requires pandas<1.6.0.dev0,>=1.3, but you have pandas 2.2.2 which is incompatible.
dask-cudf 24.2.0 requires pandas<1.6.0dev0,>=1.3, but you have pandas 2.2.2 which is incompatible.
  • After install the itkwidgets and exiting the Jupyter notebook, trying to launch the notebook again leads to a configuration error. It appears that the installation of itkwidgets is causing a disruption in the configuration settings.
Screen Shot 2024-04-17 at 15 51 33

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the hang in model_zoo/TCIA_PROSTATEx_Prostate_MRI_Anatomy_Model.ipynb using the listed Docker, Jupyter, LoadImage, and view steps. Compare the itkwidgets-related behavior with issue 688 and check whether the pandas conflicts or notebook configuration error are involved; done means the notebook kernel remains usable after visualization and can be relaunched without the reported configuration error.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
data-visualization, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.