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

timm issue #60

Open
jere1882 opened this issue Aug 5, 2023 · 5 comments
Open

timm issue #60

jere1882 opened this issue Aug 5, 2023 · 5 comments

Comments

@jere1882
Copy link

jere1882 commented Aug 5, 2023

I just followed the exact steps indicated in the ubuntu section of install.md

I cannot run training tough, because I get:

ModuleNotFoundError: No module named 'timm'

Simply running pip install timm messes up everything because it upgrades to torch 1.13.0. What do I do?

@jere1882
Copy link
Author

I solved this one by installing timm 0.3.0 - Anyways, after this, there were loads of issues to deal with. The repo doesn't really work as published here, it requires a lot of grooming.
Go use a different segmentation ViT unless you really need to use this one.

@Areebol
Copy link

Areebol commented Apr 14, 2024

Fix problem

Recreate enviroment

I have the same problem, and i solved it as follows:

# file environment_open_mmlab.yaml is at the back
conda env create -f environment_open_mmlab.yaml
conda activate open-mmlab
cd SETR
pip install -e . --user
pip install numpy==1.23.5

Fix project's type error

And be careful, you need to change file mmseg/models/decode_heads/hlg_utils.py as follows.
from

# from 
 19 from mmseg.models.backbones.hlg_share import AttentionShareGlobal, AttentionShareLocal, DWMlp, InnerPatchEmbed

# to 
 19 from mmseg.models.backbones.hlg import AttentionShareGlobal, AttentionShareLocal, DWMlp, InnerPatchEmbed

Environment configuration file

The file environment_open_mmlab.yaml mentioned above is as follows.

name: open-mmlab
channels:
  - pytorch
  - defaults
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=4.5=1_gnu
  - blas=1.0=mkl
  - ca-certificates=2021.7.5=h06a4308_1
  - certifi=2021.5.30=py39h06a4308_0
  - cudatoolkit=10.1.243=h6bb024c_0
  - freetype=2.10.4=h5ab3b9f_0
  - intel-openmp=2021.3.0=h06a4308_3350
  - jpeg=9b=h024ee3a_2
  - lcms2=2.12=h3be6417_0
  - ld_impl_linux-64=2.35.1=h7274673_9
  - libffi=3.3=he6710b0_2
  - libgcc-ng=9.3.0=h5101ec6_17
  - libgomp=9.3.0=h5101ec6_17
  - libpng=1.6.37=hbc83047_0
  - libstdcxx-ng=9.3.0=hd4cf53a_17
  - libtiff=4.2.0=h85742a9_0
  - libwebp-base=1.2.0=h27cfd23_0
  - lz4-c=1.9.3=h295c915_1
  - mkl=2021.3.0=h06a4308_520
  - mkl-service=2.4.0=py39h7f8727e_0
  - mkl_fft=1.3.0=py39h42c9631_2
  - mkl_random=1.2.2=py39h51133e4_0
  - ncurses=6.2=he6710b0_1
  - ninja=1.10.2=hff7bd54_1
  - numpy=1.20.3=py39hf144106_0
  - numpy-base=1.20.3=py39h74d4b33_0
  - olefile=0.46=pyhd3eb1b0_0
  - openjpeg=2.4.0=h3ad879b_0
  - openssl=1.1.1l=h7f8727e_0
  - pillow=8.3.1=py39h2c7a002_0
  - pip=21.2.4=py39h06a4308_0
  - python=3.9.7=h12debd9_1
  - python_abi=3.9=2_cp39
  - pytorch=1.7.1=py3.9_cuda10.1.243_cudnn7.6.3_0
  - readline=8.1=h27cfd23_0
  - setuptools=58.0.4=py39h06a4308_0
  - six=1.16.0=pyhd3eb1b0_0
  - sqlite=3.36.0=hc218d9a_0
  - tk=8.6.11=h1ccaba5_0
  - torchaudio=0.7.2=py39
  - torchvision=0.8.2=py39_cu101
  - typing_extensions=3.10.0.2=pyh06a4308_0
  - tzdata=2021a=h5d7bf9c_0
  - wheel=0.37.0=pyhd3eb1b0_1
  - xz=5.2.5=h7b6447c_0
  - zlib=1.2.11=h7b6447c_3
  - zstd=1.4.9=haebb681_0
  - pip:
    - addict==2.4.0
    - attr==0.3.1
    - backcall==0.2.0
    - decorator==5.1.0
    - ipython==7.28.0
    - jedi==0.18.0
    - kornia==0.5.11
    - matplotlib-inline==0.1.3
    - mmcv-full==1.2.7
    - opencv-python==4.5.1.48
    - packaging==21.0
    - parso==0.8.2
    - pexpect==4.8.0
    - pickleshare==0.7.5
    - prompt-toolkit==3.0.20
    - ptyprocess==0.7.0
    - pygments==2.10.0
    - pyyaml==5.4.1
    - timm==0.3.2
    - traitlets==5.1.0
    - wcwidth==0.2.5
    - yapf==0.31.0

@SuperSpongecake
Copy link

conda env create -f environment_open_mmlab.yaml

Hello,I have install my environment follow you,but it still has some problem as follow:
Pip subprocess error:
ERROR: Command errored out with exit status 1:
command: /home/ices/miniconda3/envs/open-mmlab/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mvmopo11/mmcv-full_a370c918fbd74b0d90c1b170c1022759/setup.py'"'"'; file='"'"'/tmp/pip-install-mvmopo11/mmcv-full_a370c918fbd74b0d90c1b170c1022759/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-vvhvsqg8
cwd: /tmp/pip-install-mvmopo11/mmcv-full_a370c918fbd74b0d90c1b170c1022759/
Complete output (13 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-mvmopo11/mmcv-full_a370c918fbd74b0d90c1b170c1022759/setup.py", line 302, in
ext_modules=get_extensions(),
File "/tmp/pip-install-mvmopo11/mmcv-full_a370c918fbd74b0d90c1b170c1022759/setup.py", line 223, in get_extensions
ext_ops = extension(
File "/home/ices/miniconda3/envs/open-mmlab/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 800, in CUDAExtension
library_dirs += library_paths(cuda=True)
File "/home/ices/miniconda3/envs/open-mmlab/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 892, in library_paths
if (not os.path.exists(_join_cuda_home(lib_dir)) and
File "/home/ices/miniconda3/envs/open-mmlab/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1827, in _join_cuda_home
raise EnvironmentError('CUDA_HOME environment variable is not set. '
OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
----------------------------------------
errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement mmcv-full==1.2.7 (from versions: 1.0rc0, 1.0rc2, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.6, 1.2.7, 1.3.0, 1.3.1, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8, 1.3.9, 1.3.10, 1.3.11, 1.3.12, 1.3.13, 1.3.14, 1.3.15, 1.3.16, 1.3.17, 1.3.18, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 1.4.7, 1.4.8, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2)
ERROR: No matching distribution found for mmcv-full==1.2.7

@sanitizer84
Copy link

Fix problem

Recreate enviroment

I have the same problem, and i solved it as follows:

# file environment_open_mmlab.yaml is at the back
conda env create -f environment_open_mmlab.yaml
conda activate open-mmlab
cd SETR
pip install -e . --user
pip install numpy==1.23.5

Fix project's type error

And be careful, you need to change file mmseg/models/decode_heads/hlg_utils.py as follows. from

# from 
 19 from mmseg.models.backbones.hlg_share import AttentionShareGlobal, AttentionShareLocal, DWMlp, InnerPatchEmbed

# to 
 19 from mmseg.models.backbones.hlg import AttentionShareGlobal, AttentionShareLocal, DWMlp, InnerPatchEmbed

Environment configuration file

The file environment_open_mmlab.yaml mentioned above is as follows.

name: open-mmlab
channels:
  - pytorch
  - defaults
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=4.5=1_gnu
  - blas=1.0=mkl
  - ca-certificates=2021.7.5=h06a4308_1
  - certifi=2021.5.30=py39h06a4308_0
  - cudatoolkit=10.1.243=h6bb024c_0
  - freetype=2.10.4=h5ab3b9f_0
  - intel-openmp=2021.3.0=h06a4308_3350
  - jpeg=9b=h024ee3a_2
  - lcms2=2.12=h3be6417_0
  - ld_impl_linux-64=2.35.1=h7274673_9
  - libffi=3.3=he6710b0_2
  - libgcc-ng=9.3.0=h5101ec6_17
  - libgomp=9.3.0=h5101ec6_17
  - libpng=1.6.37=hbc83047_0
  - libstdcxx-ng=9.3.0=hd4cf53a_17
  - libtiff=4.2.0=h85742a9_0
  - libwebp-base=1.2.0=h27cfd23_0
  - lz4-c=1.9.3=h295c915_1
  - mkl=2021.3.0=h06a4308_520
  - mkl-service=2.4.0=py39h7f8727e_0
  - mkl_fft=1.3.0=py39h42c9631_2
  - mkl_random=1.2.2=py39h51133e4_0
  - ncurses=6.2=he6710b0_1
  - ninja=1.10.2=hff7bd54_1
  - numpy=1.20.3=py39hf144106_0
  - numpy-base=1.20.3=py39h74d4b33_0
  - olefile=0.46=pyhd3eb1b0_0
  - openjpeg=2.4.0=h3ad879b_0
  - openssl=1.1.1l=h7f8727e_0
  - pillow=8.3.1=py39h2c7a002_0
  - pip=21.2.4=py39h06a4308_0
  - python=3.9.7=h12debd9_1
  - python_abi=3.9=2_cp39
  - pytorch=1.7.1=py3.9_cuda10.1.243_cudnn7.6.3_0
  - readline=8.1=h27cfd23_0
  - setuptools=58.0.4=py39h06a4308_0
  - six=1.16.0=pyhd3eb1b0_0
  - sqlite=3.36.0=hc218d9a_0
  - tk=8.6.11=h1ccaba5_0
  - torchaudio=0.7.2=py39
  - torchvision=0.8.2=py39_cu101
  - typing_extensions=3.10.0.2=pyh06a4308_0
  - tzdata=2021a=h5d7bf9c_0
  - wheel=0.37.0=pyhd3eb1b0_1
  - xz=5.2.5=h7b6447c_0
  - zlib=1.2.11=h7b6447c_3
  - zstd=1.4.9=haebb681_0
  - pip:
    - addict==2.4.0
    - attr==0.3.1
    - backcall==0.2.0
    - decorator==5.1.0
    - ipython==7.28.0
    - jedi==0.18.0
    - kornia==0.5.11
    - matplotlib-inline==0.1.3
    - mmcv-full==1.2.7
    - opencv-python==4.5.1.48
    - packaging==21.0
    - parso==0.8.2
    - pexpect==4.8.0
    - pickleshare==0.7.5
    - prompt-toolkit==3.0.20
    - ptyprocess==0.7.0
    - pygments==2.10.0
    - pyyaml==5.4.1
    - timm==0.3.2
    - traitlets==5.1.0
    - wcwidth==0.2.5
    - yapf==0.31.0

Thanks a lot!
And I also comment the 16th line of mmseg/models/decode_heads/hlg_utils.py to surpress the error of 'ModuleNotFoundError: No module named 'mmseg.models.backbones.region_attention''

@SuperSpongecake
Copy link

SuperSpongecake commented Nov 17, 2024 via email

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

4 participants