Skip to content

Commit d223682

Browse files
RunningLeonlvhan028
authored andcommitted
[Fix]: fix requirements of mmedit (#1496)
* update requirements * use github url * fix mmcls ut * install clip explicitly
1 parent 7483e21 commit d223682

File tree

5 files changed

+13
-11
lines changed

5 files changed

+13
-11
lines changed

.circleci/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ commands:
8686
python -m mim install -r requirements/codebases.txt
8787
python -m pip install -r requirements/tests.txt
8888
python -m pip install -r requirements/runtime.txt
89-
python -m pip install -U numpy
89+
python -m pip install -U numpy clip
9090
cd ..
9191
perform_model_converter_ut:
9292
steps:
@@ -147,7 +147,7 @@ jobs:
147147
docker exec mmdeploy mim install -r mmdeploy/requirements/codebases.txt
148148
docker exec mmdeploy pip install -r mmdeploy/requirements/tests.txt
149149
docker exec mmdeploy pip install -r mmdeploy/requirements/runtime.txt
150-
docker exec mmdeploy pip install -U numpy
150+
docker exec mmdeploy pip install -U numpy clip
151151
- run:
152152
name: Perform Model Converter unittests
153153
command: |

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
python -m pip install -r requirements.txt -r requirements/backends.txt
4949
python -m mim install "mmcv>=2.0.0rc1"
5050
python -m mim install -r requirements/codebases.txt
51-
python -m pip install -U numpy
51+
python -m pip install -U numpy clip
5252
python -m pip list
5353
- name: Build and install
5454
run: |
@@ -142,7 +142,7 @@ jobs:
142142
python -m pip install -r requirements.txt -r requirements/backends.txt
143143
python -m mim install "mmcv>=2.0.0rc1"
144144
CFLAGS=$CFLAGS python -m mim install -r requirements/codebases.txt
145-
python -m pip install -U pycuda numpy
145+
python -m pip install -U pycuda numpy clip
146146
python -m pip list
147147
- name: Build and install
148148
run: |
@@ -190,7 +190,7 @@ jobs:
190190
python -m pip install -r requirements.txt -r requirements/backends.txt
191191
python -m mim install "mmcv>=2.0.0rc1"
192192
python -m mim install -r requirements/codebases.txt
193-
python -m pip install -U pycuda numpy
193+
python -m pip install -U pycuda numpy clip
194194
python -m pip list
195195
- name: Build and install
196196
run: |

mmdeploy/codebase/mmcls/models/classifiers/base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def base_classifier__forward(
3030
Returns:
3131
return a list of :obj:`mmengine.BaseDataElement`.
3232
"""
33-
feats = self.extract_feat(batch_inputs)
34-
output = self.head(feats)
33+
output = self.extract_feat(batch_inputs)
34+
if self.head is not None:
35+
output = self.head(output)
3536
return output

requirements/codebases.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
mmcls>=1.0.0rc2
2-
mmdet @ git+https://github.com/open-mmlab/[email protected]
3-
mmdet3d @ git+https://github.com/open-mmlab/[email protected]
4-
mmedit @ git+https://github.com/open-mmlab/[email protected]
5-
mmocr @ git+https://github.com/open-mmlab/[email protected]
2+
mmdet>=3.0.0rc4
3+
mmdet3d>=1.1.0rc2
4+
mmedit>=1.0.0rc2
5+
mmocr>=1.0.0rc4
66
mmpose>=1.0.0rc0
77
mmsegmentation>=1.0.0rc0

requirements/runtime.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ mmengine
66
multiprocess
77
numpy
88
onnx>=1.8.0
9+
prettytable
910
protobuf<=3.20.1
1011
six
1112
terminaltables

0 commit comments

Comments
 (0)