z-fabian/HUMUS-Net

Broken scikit-image

Closed this issue · 5 comments

Hi, I try to run your repo with fastMRI data and it fails.
In the Installation chapter, you require to run
pip3 install -r requirements.txt
and after this run
pip3 install pytorch-lightning==1.3.3.
The problem is:
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. fastmri 0.1.1 requires pytorch-lightning<1.1,>=1.0.6, but you have pytorch-lightning 1.3.3 which is incompatible.

When I try to run with pytorch-lighting=1.3.3 I got:
ImportError: dlopen: cannot load any more object with static TLS It seems that scikit-image has not been built correctly.

I reinstalled scikit-image from scikit-image.org:
https://scikit-image.org/docs/stable/install.html#install-via-pip

(venv38) [kkornalewski@wn107 kkornalewski]$ pip list | grep scikit-image
scikit-image            0.19.2

And run still falling.

When I install and run pytorch-lightning=1.0.6 I got problem with:

File "HUMUS-Net/humus_examples/train_humus_fastmri.py", line 21, in <module> from pytorch_lightning.plugins import DDPPlugin

What am I doing wrong according to your instructions?

Hi, the first error you receive is normal. Officially the fastmri package requires pytorch-lightning==1.0.6, but we are using a more recent version, this shouldn't be an issue.

With respect to the scikit-image error:

  1. Can you verify that you installed the packages on a clean virtual environment to make sure there is no interaction with other modules?
  2. Can you show all packages in your environment using pip freeze? I will compare if there is any difference to our working version.
  3. If we cannot find the discrepancy, I created a docker image that is set up for HUMUS-Net and can be downloaded via docker pull zalanfabian/humus-net

Let me know if you have further questions.

  1. I run it on my university server. I have there my own virtual environment so it should be clean.
  2. (venv38) [kkornalewski@master1 ~]$ pip freeze absl-py==1.0.0 aiohttp==3.8.1 aiosignal==1.2.0 aiosmtpd==1.4.2 appdirs==1.4.4 asv==0.5.1 async-timeout==4.0.2 atpublic==3.0.1 attrs==21.4.0 cachetools==5.0.0 certifi==2021.10.8 charset-normalizer==2.0.12 codecov==2.1.12 coverage==6.3.3 cycler==0.11.0 einops==0.3.0 fastmri==0.1.1 flake8==4.0.1 fonttools==4.33.3 frozenlist==1.3.0 fsspec==2022.3.0 future==0.18.2 google-auth==2.6.6 google-auth-oauthlib==0.4.6 grpcio==1.46.0 h5py==2.10.0 idna==3.3 imageio==2.19.1 importlib-metadata==4.11.3 iniconfig==1.1.1 kiwisolver==1.4.2 Markdown==3.3.7 matplotlib==3.5.2 mccabe==0.6.1 multidict==6.0.2 networkx==2.8 numpy==1.22.3 oauthlib==3.2.0 packaging==21.3 Pillow==9.0.1 pluggy==1.0.0 pooch==1.6.0 protobuf==3.20.1 py==1.11.0 pyasn1==0.4.8 pyasn1-modules==0.2.8 pycodestyle==2.8.0 pyDeprecate==0.3.0 pyflakes==2.4.0 pyparsing==3.0.8 pytest==7.1.2 pytest-cov==3.0.0 pytest-faulthandler==2.0.1 pytest-localserver==0.6.0 python-dateutil==2.8.2 pytorch-lightning==1.3.3 PyWavelets==1.3.0 PyXB==1.2.6 PyYAML==5.4.1 requests==2.27.1 requests-oauthlib==1.3.1 rsa==4.8 runstats==2.0.0 scikit-image==0.19.2 scipy==1.8.0 six==1.16.0 tensorboard==2.9.0 tensorboard-data-server==0.6.1 tensorboard-plugin-wit==1.8.1 tifffile==2022.5.4 timm==0.4.12 tomli==2.0.1 torch==1.11.0+cu113 torchaudio==0.11.0+cu113 torchmetrics==0.7.3 torchvision==0.12.0+cu113 tqdm==4.64.0 typing_extensions==4.2.0 urllib3==1.26.9 Werkzeug==2.1.2 xmltodict==0.13.0 yarl==1.7.2 zipp==3.8.0

Hi, thanks for the reply. It looks like you have torch==1.11.0 installed. We tested our code on torch==1.10.1. Can you try to reinstall a CUDA version of PyTorch v1.10.1 using the command here:
pip install torch==1.10.1+cu111 torchvision==0.11.2+cu111 torchaudio==0.10.1 -f https://download.pytorch.org/whl/torch_stable.html
Let me know how it works out!

I used :
pip install torch==1.10.1+cu111 torchvision==0.11.2+cu111 torchaudio==0.10.1 -f https://download.pytorch.org/whl/torch_stable.html

pip show torch:
(venv38) [kkornalewski@wn107 kkornalewski]$ pip show torch Name: torch Version: 1.10.1+cu111
Still have: ImportError: dlopen: cannot load any more object with static TLS It seems that scikit-image has not been built correctly.

Thanks for trying this. I don't see other package differences that might cause the issue. I recommend trying to run the code inside a docker container. You can get the docker image for HUMUS-Net via
docker pull zalanfabian/humus-net

You can run an interactive container created from this image with pre-installed dependencies, cd into the HUMUS-Net folder and run the training or evaluation codes.