icevision icon indicating copy to clipboard operation
icevision copied to clipboard

Install docs fix: MMCV >= 1.3.8, < 1.4, but not 1.3.3

Open drscotthawley opened this issue 4 years ago • 3 comments

Fixes MMCV==1.3.3 is used but incompatible. Please install mmcv>=1.3.8, <=1.4.0.

BTW, here's some code I cooked up that may be of interest to other users. Didn't put in in PR itself but would be happy to do so:

import torch, re 
tv, cv = torch.__version__, torch.version.cuda
tv = re.sub('\+cu.*','',tv)
TORCH_VERSION = 'torch'+tv[0:-1]+'0'
CUDA_VERSION = 'cu'+cv.replace('.','')

print(f"TORCH_VERSION={TORCH_VERSION}; CUDA_VERSION={CUDA_VERSION}")

!pip install -qq mmcv-full=="1.3.8" -f https://download.openmmlab.com/mmcv/dist/{CUDA_VERSION}/{TORCH_VERSION}/index.html --upgrade
!pip install mmdet -qq

drscotthawley avatar Sep 17 '21 16:09 drscotthawley

Codecov Report

Merging #925 (236d167) into master (8716362) will increase coverage by 0.06%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #925      +/-   ##
==========================================
+ Coverage   86.57%   86.64%   +0.06%     
==========================================
  Files         250      250              
  Lines        5384     5412      +28     
==========================================
+ Hits         4661     4689      +28     
  Misses        723      723              
Flag Coverage Δ
unittests 86.64% <100.00%> (+0.06%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
icevision/visualize/draw_data.py 90.29% <100.00%> (ø)
icevision/core/tasks.py 100.00% <0.00%> (ø)
icevision/metrics/metric.py 100.00% <0.00%> (ø)
icevision/models/mmdet/fastai/callbacks.py 100.00% <0.00%> (ø)
icevision/models/torchvision/fastai/callbacks.py 100.00% <0.00%> (ø)
...sion/models/torchvision/lightning/model_adapter.py 100.00% <0.00%> (ø)
icevision/core/record_components.py 81.57% <0.00%> (+0.05%) :arrow_up:
icevision/models/mmdet/lightning/model_adapter.py 96.96% <0.00%> (+0.09%) :arrow_up:
...sion/tfms/albumentations/albumentations_adapter.py 96.15% <0.00%> (+0.10%) :arrow_up:
icevision/core/mask.py 82.63% <0.00%> (+0.12%) :arrow_up:
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8716362...236d167. Read the comment docs.

codecov[bot] avatar Sep 17 '21 16:09 codecov[bot]

Thanks a lot Scott for your contributions.

MMLabs recently added a new package that can automatically handle both mmcv and mmdet installation by detecting which torch, torhvision, and cuda versions are installed.

I submitted a PR to include that but we are facing unrelated issues (related to a zip file: sigh).

Here is the recommended way of mmdet/mmcv installation:

!pip install openmim -q
!echo "- Installing mmcv"
!mim install mmcv-full
!echo "- Installing mmdet"
!mim install mmdet

ai-fast-track avatar Sep 22 '21 15:09 ai-fast-track

@ai-fast-track thoughts on this one?

FraPochetti avatar Dec 31 '21 07:12 FraPochetti