Skip to content

Commit ffb7e2e

Browse files
authored
[Fix] Fix dependency (#3136)
## Motivation Change the dependency `mmcls` to `mmpretrain` ## Modification - modify `mmcls` to `mmpretrain` - modify CI requirements ## BC-breaking (Optional) If users have installed mmcls but not install mmpretrain, it might raise some error.
1 parent d3f2922 commit ffb7e2e

11 files changed

+23
-22
lines changed

.circleci/test.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ jobs:
6161
command: |
6262
pip install git+https://github.com/open-mmlab/mmengine.git@main
6363
pip install -U openmim
64-
mim install 'mmcv>=2.0.0rc4'
65-
pip install mmcls==1.0.0rc6
66-
pip install git+https://github.com/open-mmlab/mmdetection.git@main
64+
mim install mmcv>=2.0.0
65+
pip install mmpretrain>=1.0.0rc7
66+
pip install mmdet>=3.0.0
6767
pip install -r requirements/tests.txt -r requirements/optional.txt
6868
python -m pip install albumentations>=0.3.2 --no-binary qudida,albumentations
6969
- run:
@@ -101,15 +101,15 @@ jobs:
101101
name: Build Docker image
102102
command: |
103103
docker build .circleci/docker -t mmseg:gpu --build-arg PYTORCH=<< parameters.torch >> --build-arg CUDA=<< parameters.cuda >> --build-arg CUDNN=<< parameters.cudnn >>
104-
docker run --gpus all -t -d -v /home/circleci/project:/mmseg -v /home/circleci/mmengine:/mmengine -v /home/circleci/mmclassification:/mmclassification -v /home/circleci/mmdetection:/mmdetection -w /mmseg --name mmseg mmseg:gpu
104+
docker run --gpus all -t -d -v /home/circleci/project:/mmseg -v /home/circleci/mmengine:/mmengine -v /home/circleci/mmpretrain:/mmpretrain -v /home/circleci/mmdetection:/mmdetection -w /mmseg --name mmseg mmseg:gpu
105105
- run:
106106
name: Install mmseg dependencies
107107
command: |
108108
docker exec mmseg pip install -e /mmengine
109109
docker exec mmseg pip install -U openmim
110-
docker exec mmseg mim install 'mmcv>=2.0.0rc4'
111-
docker exec mmseg pip install mmcls==1.0.0rc6
112-
docker exec mmseg mim install mmdet==3.0.0
110+
docker exec mmseg mim install mmcv>=2.0.0
111+
docker exec mmseg pip install mmpretrain>=1.0.0rc7
112+
docker exec mmseg mim install mmdet>=3.0.0
113113
docker exec mmseg pip install -r requirements/tests.txt -r requirements/optional.txt
114114
docker exec mmseg python -m pip install albumentations>=0.3.2 --no-binary qudida,albumentations
115115
- run:
@@ -145,8 +145,8 @@ workflows:
145145
- main
146146
- build_cpu:
147147
name: minimum_version_cpu
148-
torch: 1.6.0
149-
torchvision: 0.7.0
148+
torch: 1.8.1
149+
torchvision: 0.9.1
150150
python: "3.7"
151151
requires:
152152
- lint
@@ -177,7 +177,7 @@ workflows:
177177
jobs:
178178
- build_cuda:
179179
name: minimum_version_gpu
180-
torch: 1.6.0
180+
torch: 1.8.1
181181
# Use double quotation mark to explicitly specify its type
182182
# as string instead of number
183183
cuda: "10.1"

configs/_base_/models/fpn_poolformer_s12.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
# TODO: delete custom_imports after mmcls supports auto import
55
# please install mmcls>=1.0
66
# import mmcls.models to trigger register_module in mmcls
7-
custom_imports = dict(imports=['mmcls.models'], allow_failed_imports=False)
7+
custom_imports = dict(
8+
imports=['mmpretrain.models'], allow_failed_imports=False)
89
data_preprocessor = dict(
910
type='SegDataPreProcessor',
1011
mean=[123.675, 116.28, 103.53],
@@ -16,7 +17,7 @@
1617
type='EncoderDecoder',
1718
data_preprocessor=data_preprocessor,
1819
backbone=dict(
19-
type='mmcls.PoolFormer',
20+
type='mmpretrain.PoolFormer',
2021
arch='s12',
2122
init_cfg=dict(
2223
type='Pretrained', checkpoint=checkpoint_file, prefix='backbone.'),

configs/_base_/models/upernet_convnext.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
norm_cfg = dict(type='SyncBN', requires_grad=True)
2-
custom_imports = dict(imports='mmcls.models', allow_failed_imports=False)
2+
custom_imports = dict(imports='mmpretrain.models', allow_failed_imports=False)
33
checkpoint_file = 'https://download.openmmlab.com/mmclassification/v0/convnext/downstream/convnext-base_3rdparty_32xb128-noema_in1k_20220301-2a0ee547.pth' # noqa
44
data_preprocessor = dict(
55
type='SegDataPreProcessor',
@@ -13,7 +13,7 @@
1313
data_preprocessor=data_preprocessor,
1414
pretrained=None,
1515
backbone=dict(
16-
type='mmcls.ConvNeXt',
16+
type='mmpretrain.ConvNeXt',
1717
arch='base',
1818
out_indices=[0, 1, 2, 3],
1919
drop_path_rate=0.4,

configs/convnext/convnext-base_upernet_8xb2-amp-160k_ade20k-640x640.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
model = dict(
1010
data_preprocessor=data_preprocessor,
1111
backbone=dict(
12-
type='mmcls.ConvNeXt',
12+
type='mmpretrain.ConvNeXt',
1313
arch='base',
1414
out_indices=[0, 1, 2, 3],
1515
drop_path_rate=0.4,

configs/convnext/convnext-large_upernet_8xb2-amp-160k_ade20k-640x640.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
model = dict(
1010
data_preprocessor=data_preprocessor,
1111
backbone=dict(
12-
type='mmcls.ConvNeXt',
12+
type='mmpretrain.ConvNeXt',
1313
arch='large',
1414
out_indices=[0, 1, 2, 3],
1515
drop_path_rate=0.4,

configs/convnext/convnext-small_upernet_8xb2-amp-160k_ade20k-512x512.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
model = dict(
99
data_preprocessor=data_preprocessor,
1010
backbone=dict(
11-
type='mmcls.ConvNeXt',
11+
type='mmpretrain.ConvNeXt',
1212
arch='small',
1313
out_indices=[0, 1, 2, 3],
1414
drop_path_rate=0.3,

configs/convnext/convnext-tiny_upernet_8xb2-amp-160k_ade20k-512x512.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
model = dict(
99
data_preprocessor=data_preprocessor,
1010
backbone=dict(
11-
type='mmcls.ConvNeXt',
11+
type='mmpretrain.ConvNeXt',
1212
arch='tiny',
1313
out_indices=[0, 1, 2, 3],
1414
drop_path_rate=0.4,

configs/convnext/convnext-xlarge_upernet_8xb2-amp-160k_ade20k-640x640.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
model = dict(
1010
data_preprocessor=data_preprocessor,
1111
backbone=dict(
12-
type='mmcls.ConvNeXt',
12+
type='mmpretrain.ConvNeXt',
1313
arch='xlarge',
1414
out_indices=[0, 1, 2, 3],
1515
drop_path_rate=0.4,

configs/poolformer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Transformers have shown great potential in computer vision tasks. A common belie
3939
- PoolFormer backbone needs to install [MMClassification](https://github.com/open-mmlab/mmclassification) first, which has abundant backbones for downstream tasks.
4040

4141
```shell
42-
pip install "mmcls>=1.0.0rc0"
42+
pip install "mmpretrain>=1.0.0rc7"
4343
```
4444

4545
- The pretrained models could also be downloaded from [PoolFormer config of MMClassification](https://github.com/open-mmlab/mmclassification/tree/master/configs/poolformer).

docs/en/notes/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The compatible MMSegmentation, MMCV and MMEngine versions are as below. Please i
88

99
| MMSegmentation version | MMCV version | MMEngine version | MMClassification (optional) version | MMDetection (optional) version |
1010
| :--------------------: | :----------------------------: | :---------------: | :---------------------------------: | :----------------------------: |
11-
| dev-1.x branch | mmcv >= 2.0.0rc4 | MMEngine >= 0.7.1 | mmcls==1.0.0rc6 | mmdet >= 3.0.0 |
11+
| dev-1.x branch | mmcv >= 2.0.0 | MMEngine >= 0.7.4 | mmpretrain>=1.0.0rc7 | mmdet >= 3.0.0 |
1212
| main branch | mmcv >= 2.0.0rc4 | MMEngine >= 0.7.1 | mmcls==1.0.0rc6 | mmdet >= 3.0.0 |
1313
| 1.0.0 | mmcv >= 2.0.0rc4 | MMEngine >= 0.7.1 | mmcls==1.0.0rc6 | mmdet >= 3.0.0 |
1414
| 1.0.0rc6 | mmcv >= 2.0.0rc4 | MMEngine >= 0.5.0 | mmcls>=1.0.0rc0 | mmdet >= 3.0.0rc6 |

0 commit comments

Comments
 (0)