Skip to content

Commit 5638af7

Browse files
authored
[CI] update torch version in ci (#2652)
1 parent 6e1d6a4 commit 5638af7

File tree

4 files changed

+122
-39
lines changed

4 files changed

+122
-39
lines changed

.circleci/test.yml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ jobs:
5454
pip install wheel
5555
- run:
5656
name: Install PyTorch
57-
command: |
58-
python -V
59-
python -m pip install torch==<< parameters.torch >>+cpu torchvision==<< parameters.torchvision >>+cpu -f https://download.pytorch.org/whl/torch_stable.html
57+
command: pip install torch==<< parameters.torch >>+cpu torchvision==<< parameters.torchvision >>+cpu -f https://download.pytorch.org/whl/torch_stable.html
6058
- when:
6159
condition:
6260
equal: ["3.9.0", << parameters.python >>]
@@ -65,29 +63,29 @@ jobs:
6563
- run:
6664
name: Install mmdet3d dependencies
6765
command: |
68-
python -m pip install git+ssh://[email protected]/open-mmlab/mmengine.git@main
66+
pip install git+ssh://[email protected]/open-mmlab/mmengine.git@main
6967
pip install -U openmim
7068
mim install 'mmcv >= 2.0.0rc4'
71-
mim install 'mmdet >= 3.0.0'
72-
pip install -r requirements.txt
69+
pip install git+ssh://[email protected]/open-mmlab/[email protected]
70+
pip install -r requirements/tests.txt
7371
- run:
7472
name: Build and install
7573
command: |
7674
pip install -e .
7775
- run:
7876
name: Run unittests
7977
command: |
80-
python -m coverage run --branch --source mmdet3d -m pytest tests/
81-
python -m coverage xml
82-
python -m coverage report -m
78+
coverage run --branch --source mmdet3d -m pytest tests/
79+
coverage xml
80+
coverage report -m
8381
8482
build_cuda:
8583
parameters:
8684
torch:
8785
type: string
8886
cuda:
8987
type: enum
90-
enum: ["10.1", "10.2", "11.1"]
88+
enum: ["10.1", "10.2", "11.1", "11.7"]
9189
cudnn:
9290
type: integer
9391
default: 7
@@ -116,15 +114,15 @@ jobs:
116114
docker exec mmdet3d pip install -U openmim
117115
docker exec mmdet3d mim install 'mmcv >= 2.0.0rc4'
118116
docker exec mmdet3d pip install -e /mmdetection
119-
docker exec mmdet3d pip install -r requirements.txt
117+
docker exec mmdet3d pip install -r requirements/tests.txt
120118
- run:
121119
name: Build and install
122120
command: |
123121
docker exec mmdet3d pip install -e .
124122
- run:
125123
name: Run unittests
126124
command: |
127-
docker exec mmdet3d python -m pytest tests/
125+
docker exec mmdet3d pytest tests/
128126
129127
workflows:
130128
pr_stage_lint:
@@ -148,15 +146,15 @@ workflows:
148146
- dev-1.x
149147
- build_cpu:
150148
name: minimum_version_cpu
151-
torch: 1.6.0
152-
torchvision: 0.7.0
149+
torch: 1.8.1
150+
torchvision: 0.9.1
153151
python: 3.7.4 # The lowest python 3.7.x version available on CircleCI images
154152
requires:
155153
- lint
156154
- build_cpu:
157155
name: maximum_version_cpu
158-
torch: 1.13.0
159-
torchvision: 0.14.0
156+
torch: 2.0.0
157+
torchvision: 0.15.1
160158
python: 3.9.0
161159
requires:
162160
- minimum_version_cpu
@@ -172,14 +170,21 @@ workflows:
172170
cuda: "10.2"
173171
requires:
174172
- hold
173+
- build_cuda:
174+
name: maximum_version_gpu
175+
torch: 2.0.0
176+
cuda: "11.7"
177+
cudnn: 8
178+
requires:
179+
- hold
175180
merge_stage_test:
176181
when:
177182
not: << pipeline.parameters.lint_only >>
178183
jobs:
179184
- build_cuda:
180185
name: minimum_version_gpu
181-
torch: 1.6.0
182-
cuda: "10.1"
186+
torch: 1.8.1
187+
cuda: "10.2"
183188
filters:
184189
branches:
185190
only:

.github/workflows/merge_stage_test.yml

Lines changed: 52 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: ubuntu-22.04
2222
strategy:
2323
matrix:
24-
python-version: [3.7, 3.8, 3.9]
24+
python-version: [3.8, 3.9]
2525
torch: [1.8.1]
2626
include:
2727
- torch: 1.8.1
@@ -43,7 +43,7 @@ jobs:
4343
pip install -U openmim
4444
mim install 'mmcv >= 2.0.0rc4'
4545
- name: Install MMDet
46-
run: mim install 'mmdet>=3.0.0'
46+
run: pip install git+https://github.com/open-mmlab/[email protected]
4747
- name: Install other dependencies
4848
run: pip install -r requirements/tests.txt
4949
- name: Build and install
@@ -59,12 +59,8 @@ jobs:
5959
strategy:
6060
matrix:
6161
python-version: [3.7]
62-
torch: [1.6.0, 1.7.1, 1.8.1, 1.9.1, 1.10.1, 1.11.0, 1.12.1, 1.13.0]
62+
torch: [1.8.1, 1.9.1, 1.10.1, 1.11.0, 1.12.0, 1.13.0, 2.0.0]
6363
include:
64-
- torch: 1.6.0
65-
torchvision: 0.7.0
66-
- torch: 1.7.1
67-
torchvision: 0.8.2
6864
- torch: 1.8.1
6965
torchvision: 0.9.1
7066
- torch: 1.9.1
@@ -73,8 +69,8 @@ jobs:
7369
torchvision: 0.11.2
7470
- torch: 1.11.0
7571
torchvision: 0.12.0
76-
- torch: 1.12.1
77-
torchvision: 0.13.1
72+
- torch: 1.12.0
73+
torchvision: 0.13.0
7874
- torch: 1.13.0
7975
torchvision: 0.14.0
8076
- torch: 2.0.0
@@ -97,7 +93,7 @@ jobs:
9793
pip install -U openmim
9894
mim install 'mmcv >= 2.0.0rc4'
9995
- name: Install MMDet
100-
run: mim install 'mmdet>=3.0.0'
96+
run: pip install git+https://github.com/open-mmlab/[email protected]
10197
- name: Install other dependencies
10298
run: pip install -r requirements/tests.txt
10399
- name: Build and install
@@ -147,7 +143,7 @@ jobs:
147143
pip install git+https://github.com/open-mmlab/mmengine.git@main
148144
pip install -U openmim
149145
mim install 'mmcv >= 2.0.0rc4'
150-
mim install 'mmdet>=3.0.0'
146+
pip install git+https://github.com/open-mmlab/[email protected]
151147
pip install -r requirements/tests.txt
152148
- name: Build and install
153149
run: pip install -e .
@@ -183,7 +179,43 @@ jobs:
183179
pip install git+https://github.com/open-mmlab/mmengine.git@main
184180
pip install -U openmim
185181
mim install 'mmcv >= 2.0.0rc4'
186-
mim install 'mmdet>=3.0.0'
182+
pip install git+https://github.com/open-mmlab/[email protected]
183+
pip install -r requirements/tests.txt
184+
- name: Build and install
185+
run: pip install -e .
186+
- name: Run unittests and generate coverage report
187+
run: |
188+
coverage run --branch --source mmcv -m pytest tests
189+
coverage xml
190+
coverage report -m
191+
192+
build_cu117:
193+
runs-on: ubuntu-22.04
194+
container:
195+
image: pytorch/pytorch:2.0.0-cuda11.7-cudnn8-devel
196+
strategy:
197+
matrix:
198+
python-version: [3.9]
199+
steps:
200+
- uses: actions/checkout@v3
201+
- name: Set up Python ${{ matrix.python-version }}
202+
uses: actions/setup-python@v4
203+
with:
204+
python-version: ${{ matrix.python-version }}
205+
- name: Upgrade pip
206+
run: pip install pip --upgrade && pip install wheel
207+
- name: Fetch GPG keys
208+
run: |
209+
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
210+
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
211+
- name: Install system dependencies
212+
run: apt-get update && apt-get install -y git ffmpeg libturbojpeg
213+
- name: Install mmdet3d dependencies
214+
run: |
215+
pip install git+https://github.com/open-mmlab/mmengine.git@main
216+
pip install -U openmim
217+
mim install 'mmcv >= 2.0.0rc4'
218+
pip install git+https://github.com/open-mmlab/[email protected]
187219
pip install -r requirements/tests.txt
188220
- name: Build and install
189221
run: pip install -e .
@@ -201,12 +233,17 @@ jobs:
201233
platform: [cpu, cu111]
202234
torch: [1.8.1]
203235
torchvision: [0.9.1]
236+
include:
237+
- python-version: 3.8
238+
platform: cu117
239+
torch: 2.0.0
240+
torchvision: 0.15.1
204241
steps:
205242
- uses: actions/checkout@v3
206-
- name: Set up Python ${{ matrix.python }}
243+
- name: Set up Python ${{ matrix.python-version }}
207244
uses: actions/setup-python@v4
208245
with:
209-
python-version: ${{ matrix.python }}
246+
python-version: ${{ matrix.python-version }}
210247
- name: Upgrade pip
211248
run: python -m pip install pip --upgrade && pip install wheel
212249
- name: Install lmdb
@@ -218,7 +255,7 @@ jobs:
218255
pip install git+https://github.com/open-mmlab/mmengine.git@main
219256
pip install -U openmim
220257
mim install 'mmcv >= 2.0.0rc4'
221-
mim install 'mmdet>=3.0.0'
258+
pip install git+https://github.com/open-mmlab/[email protected]
222259
pip install -r requirements/tests.txt
223260
- name: Build and install
224261
run: pip install -e .

.github/workflows/pr_stage_test.yml

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
pip install -U openmim
4141
mim install 'mmcv >= 2.0.0rc4'
4242
- name: Install MMDet
43-
run: mim install 'mmdet>=3.0.0'
43+
run: pip install git+https://github.com/open-mmlab/[email protected]
4444
- name: Install other dependencies
4545
run: pip install -r requirements/tests.txt
4646
- name: Build and install
@@ -86,7 +86,43 @@ jobs:
8686
pip install git+https://github.com/open-mmlab/mmengine.git@main
8787
pip install -U openmim
8888
mim install 'mmcv >= 2.0.0rc4'
89-
mim install 'mmdet>=3.0.0'
89+
pip install git+https://github.com/open-mmlab/[email protected]
90+
pip install -r requirements/tests.txt
91+
- name: Build and install
92+
run: pip install -e .
93+
- name: Run unittests and generate coverage report
94+
run: |
95+
coverage run --branch --source mmdet3d -m pytest tests/
96+
coverage xml
97+
coverage report -m
98+
99+
build_cu117:
100+
runs-on: ubuntu-22.04
101+
container:
102+
image: pytorch/pytorch:2.0.0-cuda11.7-cudnn8-devel
103+
strategy:
104+
matrix:
105+
python-version: [3.9]
106+
steps:
107+
- uses: actions/checkout@v3
108+
- name: Set up Python ${{ matrix.python-version }}
109+
uses: actions/setup-python@v4
110+
with:
111+
python-version: ${{ matrix.python-version }}
112+
- name: Upgrade pip
113+
run: pip install pip --upgrade && pip install wheel
114+
- name: Fetch GPG keys
115+
run: |
116+
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
117+
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
118+
- name: Install system dependencies
119+
run: apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6
120+
- name: Install mmdet3d dependencies
121+
run: |
122+
pip install git+https://github.com/open-mmlab/mmengine.git@main
123+
pip install -U openmim
124+
mim install 'mmcv >= 2.0.0rc4'
125+
pip install git+https://github.com/open-mmlab/[email protected]
90126
pip install -r requirements/tests.txt
91127
- name: Build and install
92128
run: pip install -e .
@@ -104,6 +140,11 @@ jobs:
104140
platform: [cpu, cu111]
105141
torch: [1.8.1]
106142
torchvision: [0.9.1]
143+
include:
144+
- python-version: 3.8
145+
platform: cu117
146+
torch: 2.0.0
147+
torchvision: 0.15.1
107148
steps:
108149
- uses: actions/checkout@v3
109150
- name: Set up Python ${{ matrix.python-version }}
@@ -121,7 +162,7 @@ jobs:
121162
pip install git+https://github.com/open-mmlab/mmengine.git@main
122163
pip install -U openmim
123164
mim install 'mmcv >= 2.0.0rc4'
124-
mim install 'mmdet>=3.0.0'
165+
pip install git+https://github.com/open-mmlab/[email protected]
125166
pip install -r requirements/tests.txt
126167
- name: Build and install
127168
run: pip install -e .

.github/workflows/test_mim.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ jobs:
2121
strategy:
2222
matrix:
2323
python-version: [3.7]
24-
torch: [1.8.0]
24+
torch: [1.8.1]
2525
include:
26-
- torch: 1.8.0
26+
- torch: 1.8.1
2727
torch_version: torch1.8
28-
torchvision: 0.9.0
28+
torchvision: 0.9.1
2929
steps:
3030
- uses: actions/checkout@v3
3131
- name: Set up Python ${{ matrix.python-version }}

0 commit comments

Comments
 (0)