Skip to content

Commit

Permalink
Support pytorch 1.8 CI (open-mmlab#791)
Browse files Browse the repository at this point in the history
* supoort pytorch 1.8 CI

* mmcv latest

* torchvision issue

* fix

* fix

* pt1.3

* pt1.3
  • Loading branch information
dreamerlin authored Apr 8, 2021
1 parent 723e724 commit af4cc63
Showing 1 changed file with 22 additions and 26 deletions.
48 changes: 22 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ jobs:
strategy:
matrix:
python-version: [3.7]
torch: [1.3.0, 1.5.0, 1.6.0, 1.7.0]
torch: [1.5.0, 1.6.0, 1.7.0, 1.8.0]
include:
- torch: 1.3.0
torchvision: 0.4.1
- torch: 1.5.0
torchvision: 0.6.0
- torch: 1.6.0
torchvision: 0.7.0
- torch: 1.7.0
torchvision: 0.8.1
- torch: 1.8.0
torchvision: 0.9.0
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -60,7 +60,7 @@ jobs:
- name: Install PyTorch
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
- name: Install MMCV
run: pip install mmcv-full==1.3.0 -f https://download.openmmlab.com/mmcv/dist/cpu/torch${{matrix.torch}}/index.html
run: pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cpu/torch${{matrix.torch}}/index.html
- name: Install MMDet
run: pip install git+https://github.com/open-mmlab/mmdetection/
- name: Install MMCls
Expand All @@ -84,23 +84,23 @@ jobs:
strategy:
matrix:
python-version: [3.7]
torch: [1.3.0, 1.5.0, 1.6.0, 1.7.0]
torch: [1.3.0, 1.5.0+cu101, 1.6.0+cu101, 1.7.0+cu101, 1.8.0+cu101]
include:
- torch: 1.3.0
torchvision: 0.4.1
- torch: 1.5.0
torchvision: 0.6.0
- torch: 1.6.0
torchvision: 0.7.0
- torch: 1.7.0
torchvision: 0.8.1
- torch: 1.7.0
torchvision: 0.8.1
python-version: 3.6
- torch: 1.7.0
torchvision: 0.8.1
python-version: 3.8

mmcv: 1.3.0+cu101
- torch: 1.5.0+cu101
torchvision: 0.6.0+cu101
mmcv: 1.5.0+cu101
- torch: 1.6.0+cu101
torchvision: 0.7.0+cu101
mmcv: 1.6.0+cu101
- torch: 1.7.0+cu101
torchvision: 0.8.1+cu101
mmcv: 1.7.0+cu101
- torch: 1.8.0+cu101
torchvision: 0.9.0+cu101
mmcv: 1.8.0+cu101
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -135,16 +135,10 @@ jobs:
- name: Install lmdb
run: pip install lmdb
- name: Install PyTorch
run: |
if [ ${{matrix.torch}} == '1.3.0' ]
then
pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
else
pip install torch==${{matrix.torch}}+cu101 torchvision==${{matrix.torchvision}}+cu101 -f https://download.pytorch.org/whl/torch_stable.html
fi
run: pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
- name: Install mmaction dependencies
run: |
pip install mmcv-full==1.3.0 -f https://download.openmmlab.com/mmcv/dist/cu101/torch${{matrix.torch}}/index.html
pip install mmcv-full==latest+torch${{matrix.mmcv}} -f https://download.openmmlab.com/mmcv/dist/index.html --use-deprecated=legacy-resolver
pip install -q git+https://github.com/open-mmlab/mmdetection/
pip install -q git+https://github.com/open-mmlab/mmclassification/
pip install -r requirements.txt
Expand All @@ -158,7 +152,9 @@ jobs:
coverage run --branch --source mmaction -m pytest tests/
coverage xml
coverage report -m
# Only upload coverage report for python3.7 && pytorch1.5
- name: Upload coverage to Codecov
if: ${{matrix.torch == '1.5.0+cu101' && matrix.python-version == '3.7'}}
uses: codecov/[email protected]
with:
file: ./coverage.xml
Expand Down

0 comments on commit af4cc63

Please sign in to comment.