Skip to content

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

Open
drscotthawley wants to merge 2 commits into
airctic:masterfrom
drscotthawley:master
Open

Install docs fix: MMCV >= 1.3.8, < 1.4, but not 1.3.3#925
drscotthawley wants to merge 2 commits into
airctic:masterfrom
drscotthawley:master

Conversation

@drscotthawley
Copy link
Copy Markdown
Contributor

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

Kept getting error:

```
TypeError: can only concatenate str (not "numpy.int64") to str
```
Fixes `AssertionError: MMCV==1.3.3 is used but incompatible. Please install mmcv>=1.3.8, <=1.4.0`.
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 17, 2021

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.64%. Comparing base (8716362) to head (236d167).
Report is 97 commits behind head on master.

Additional details and impacted files
@@            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%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ai-fast-track
Copy link
Copy Markdown
Collaborator

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

@FraPochetti
Copy link
Copy Markdown
Contributor

@ai-fast-track thoughts on this one?

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

Successfully merging this pull request may close these issues.

3 participants