Skip mmcv in CI when torch < 1.8 (#1199)
parent
0052873b41
commit
1ab646de17
.circleci
.github/workflows
|
@ -89,8 +89,14 @@ jobs:
|
|||
name: Install unit tests dependencies
|
||||
command: |
|
||||
pip install -r requirements/tests.txt
|
||||
pip install openmim
|
||||
mim install 'mmcv>=2.0.0rc1'
|
||||
- run:
|
||||
name: Install mmcv
|
||||
command: |
|
||||
export PYTORCH=<< parameters.torch >>
|
||||
if [[ "${PYTORCH}" > "1.8.0" || "${PYTORCH}" == "1.8.0" ]]; then
|
||||
pip install openmim
|
||||
mim install mmcv
|
||||
fi
|
||||
- run:
|
||||
name: Run unittests
|
||||
command: |
|
||||
|
@ -118,7 +124,7 @@ jobs:
|
|||
name: Build Docker image
|
||||
command: |
|
||||
docker build .circleci/docker -t mmengine:gpu --build-arg PYTORCH=<< parameters.torch >> --build-arg CUDA=<< parameters.cuda >> --build-arg CUDNN=<< parameters.cudnn >>
|
||||
docker run --gpus all -t -d -v /home/circleci/project:/mmengine -w /mmengine --name mmengine mmengine:gpu
|
||||
docker run --gpus all -t -d -v /home/circleci/project:/mmengine -e PYTORCH=<< parameters.torch >> -w /mmengine --name mmengine mmengine:gpu
|
||||
- run:
|
||||
name: Build MMEngine from source
|
||||
command: |
|
||||
|
@ -127,8 +133,13 @@ jobs:
|
|||
name: Install unit tests dependencies
|
||||
command: |
|
||||
docker exec mmengine pip install -r requirements/tests.txt
|
||||
docker exec mmengine pip install openmim
|
||||
docker exec mmengine mim install 'mmcv>=2.0.0rc1'
|
||||
- run:
|
||||
name: Install mmcv
|
||||
command: |
|
||||
if [[ "${PYTORCH}" > "1.8.0" || "${PYTORCH}" == "1.8.0" ]]; then
|
||||
docker exec mmengine pip install openmim
|
||||
docker exec mmengine mim install mmcv
|
||||
fi
|
||||
- run:
|
||||
name: Run unittests
|
||||
command: |
|
||||
|
@ -163,7 +174,7 @@ jobs:
|
|||
command: |
|
||||
docker exec mmengine pip install -r requirements/tests.txt
|
||||
docker exec mmengine pip install openmim
|
||||
docker exec mmengine mim install 'mmcv>=2.0.0rc1'
|
||||
docker exec mmengine mim install mmcv
|
||||
- run:
|
||||
name: Install down stream repositories
|
||||
command: |
|
||||
|
|
|
@ -45,7 +45,7 @@ jobs:
|
|||
run: |
|
||||
pip install -r requirements/tests.txt
|
||||
pip install openmim
|
||||
mim install 'mmcv>=2.0.0rc1'
|
||||
mim install mmcv
|
||||
- name: Run unittests and generate coverage report
|
||||
run: |
|
||||
coverage run --branch --source mmengine -m pytest tests/ --ignore tests/test_dist
|
||||
|
@ -95,8 +95,11 @@ jobs:
|
|||
- name: Install unit tests dependencies
|
||||
run: |
|
||||
pip install -r requirements/tests.txt
|
||||
- name: Install mmcv
|
||||
run: |
|
||||
pip install openmim
|
||||
mim install 'mmcv>=2.0.0rc1'
|
||||
mim install mmcv
|
||||
if: ${{ matrix.torch > '1.8.0' || matrix.torch == '1.8.0' }
|
||||
- name: Run unittests and generate coverage report
|
||||
run: |
|
||||
coverage run --branch --source mmengine -m pytest tests/ --ignore tests/test_dist
|
||||
|
@ -143,7 +146,7 @@ jobs:
|
|||
run: |
|
||||
pip install -r requirements/tests.txt
|
||||
pip install openmim
|
||||
mim install 'mmcv>=2.0.0rc1'
|
||||
mim install mmcv
|
||||
- name: Run unittests and generate coverage report
|
||||
run: |
|
||||
coverage run --branch --source mmengine -m pytest tests/ --ignore tests/test_dist
|
||||
|
@ -177,7 +180,7 @@ jobs:
|
|||
run: |
|
||||
pip install -r requirements/tests.txt
|
||||
pip install openmim
|
||||
mim install 'mmcv>=2.0.0rc1'
|
||||
mim install mmcv
|
||||
# Distributed related unit test may randomly error in PyTorch 1.13.0
|
||||
- name: Run unittests and generate coverage report
|
||||
run: |
|
||||
|
@ -212,7 +215,7 @@ jobs:
|
|||
run: |
|
||||
pip install -r requirements/tests.txt
|
||||
pip install openmim
|
||||
mim install 'mmcv>=2.0.0rc1'
|
||||
mim install mmcv
|
||||
# Distributed related unit test may randomly error in PyTorch 1.13.0
|
||||
- name: Run unittests and generate coverage report
|
||||
run: |
|
||||
|
@ -250,8 +253,11 @@ jobs:
|
|||
- name: Install unit tests dependencies
|
||||
run: |
|
||||
pip install -r requirements/tests.txt
|
||||
- name: Install mmcv
|
||||
run: |
|
||||
pip install openmim
|
||||
mim install 'mmcv>=2.0.0rc1'
|
||||
mim install mmcv
|
||||
if: ${{ matrix.torch > '1.8.0' || matrix.torch == '1.8.0' }
|
||||
# Distributed-related unit tests may fail in macOS
|
||||
# Skip testing setup_env since it does not work in the current CI environment # TODO
|
||||
- name: Run unittests and generate coverage report
|
||||
|
@ -290,7 +296,7 @@ jobs:
|
|||
run: |
|
||||
pip install -r requirements/tests.txt
|
||||
pip install openmim
|
||||
mim install 'mmcv>=2.0.0rc1'
|
||||
mim install mmcv
|
||||
- name: Run CPU unittests
|
||||
run: pytest tests/ --ignore tests/test_dist
|
||||
if: ${{ matrix.platform == 'cpu' }}
|
||||
|
|
|
@ -44,7 +44,7 @@ jobs:
|
|||
run: |
|
||||
pip install -r requirements/tests.txt
|
||||
pip install openmim
|
||||
mim install 'mmcv>=2.0.0rc1'
|
||||
mim install mmcv
|
||||
- name: Run unittests and generate coverage report
|
||||
run: |
|
||||
coverage run --branch --source mmengine -m pytest tests/ --ignore tests/test_dist
|
||||
|
@ -89,7 +89,7 @@ jobs:
|
|||
run: |
|
||||
pip install -r requirements/tests.txt
|
||||
pip install openmim
|
||||
mim install 'mmcv>=2.0.0rc1'
|
||||
mim install mmcv
|
||||
- name: Run unittests and generate coverage report
|
||||
run: |
|
||||
coverage run --branch --source mmengine -m pytest tests/ --ignore tests/test_dist
|
||||
|
@ -123,7 +123,7 @@ jobs:
|
|||
run: |
|
||||
pip install -r requirements/tests.txt
|
||||
pip install openmim
|
||||
mim install 'mmcv>=2.0.0rc1'
|
||||
mim install mmcv
|
||||
# Distributed related unit test may randomly error in PyTorch 1.13.0
|
||||
- name: Run unittests and generate coverage report
|
||||
run: |
|
||||
|
@ -161,7 +161,7 @@ jobs:
|
|||
run: |
|
||||
pip install -r requirements/tests.txt
|
||||
pip install openmim
|
||||
mim install 'mmcv>=2.0.0rc1'
|
||||
mim install mmcv
|
||||
- name: Run CPU unittests
|
||||
run: pytest tests/ --ignore tests/test_dist
|
||||
if: ${{ matrix.platform == 'cpu' }}
|
||||
|
|
Loading…
Reference in New Issue