MIC-DKFZ / nnUNet

Apache License 2.0
5.95k stars 1.77k forks source link

`nnunetv2.inference` crashes on import (`No module named 'blosc2'`) due to buggy `acvl_utils` release #2589

Closed joshuacwnewton closed 2 days ago

joshuacwnewton commented 2 weeks ago

Traceback:

  File "/home/runner/sct_0.0/spinalcordtoolbox/deepseg/inference.py", line 27, in <module>
    import spinalcordtoolbox.deepseg.nnunet as ds_nnunet
  File "/home/runner/sct_0.0/spinalcordtoolbox/deepseg/nnunet.py", line 13, in <module>
    from nnunetv2.inference.predict_from_raw_data import nnUNetPredictor   # noqa: E402
  File "/home/runner/sct_0.0/python/envs/venv_sct/lib/python3.9/site-packages/nnunetv2/inference/predict_from_raw_data.py", line 22, in <module>
    from nnunetv2.inference.data_iterators import PreprocessAdapterFromNpy, preprocessing_iterator_fromfiles, \
  File "/home/runner/sct_0.0/python/envs/venv_sct/lib/python3.9/site-packages/nnunetv2/inference/data_iterators.py", line 12, in <module>
    from nnunetv2.preprocessing.preprocessors.default_preprocessor import DefaultPreprocessor
  File "/home/runner/sct_0.0/python/envs/venv_sct/lib/python3.9/site-packages/nnunetv2/preprocessing/preprocessors/default_preprocessor.py", line 23, in <module>
    from nnunetv2.preprocessing.cropping.cropping import crop_to_nonzero
  File "/home/runner/sct_0.0/python/envs/venv_sct/lib/python3.9/site-packages/nnunetv2/preprocessing/cropping/cropping.py", line 5, in <module>
    from acvl_utils.cropping_and_padding.bounding_boxes import get_bbox_from_mask, crop_to_bbox, bounding_box_to_slice
  File "/home/runner/sct_0.0/python/envs/venv_sct/lib/python3.9/site-packages/acvl_utils/cropping_and_padding/bounding_boxes.py", line 5, in <module>
    import blosc2
ModuleNotFoundError: No module named 'blosc2'

This is a duplicate of https://github.com/MIC-DKFZ/acvl_utils/issues/2, but I'm re-reporting here just in case anyone else runs into this bug and tries to find it by checking nnUNet's issues.

NathanMolinier commented 2 weeks ago

Same problem !

nis commented 1 week ago

Downgrading acvl_utils to version 0.2 gets rid of the initial error, though I haven't run any real work yet. So there might be other problems. pip install --upgrade acvl_utils==0.2

elpequeno commented 1 week ago

I did the same thing: downgrading acvl_utils to version 0.2 worked for me. So far all my experiments seem to run.

ykirchhoff commented 2 days ago

Hi everyone,

from the acvl-utils issue it seems like this should be resolved. Please let me know if there are any further issues.

Best, Yannick