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

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

drscotthawley
Copy link
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

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
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
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