pull/1371/head
mzr1996 2023-02-17 15:27:30 +08:00
parent 0979e78573
commit 4016f1348e
8 changed files with 23 additions and 23 deletions

View File

@ -22,7 +22,7 @@ workflows:
# line:
# <regex path-to-test> <parameter-to-set> <value-of-pipeline-parameter>
mapping: |
mmcls/.* lint_only false
mmpretrain/.* lint_only false
requirements/.* lint_only false
tests/.* lint_only false
.circleci/.* lint_only false

View File

@ -31,7 +31,7 @@ jobs:
name: Check docstring coverage
command: |
pip install interrogate
interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-magic --ignore-regex "__repr__" --fail-under 60 mmcls
interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-magic --ignore-regex "__repr__" --fail-under 60 mmpretrain
build_cpu_with_3rdparty:
parameters:
# The python version must match available image tags in
@ -63,7 +63,7 @@ jobs:
python -V
pip install torch==<< parameters.torch >>+cpu torchvision==<< parameters.torchvision >>+cpu -f https://download.pytorch.org/whl/torch_stable.html
- run:
name: Install mmcls dependencies
name: Install mmpretrain dependencies
command: |
pip install git+https://github.com/open-mmlab/mmengine.git@main
pip install -U openmim
@ -79,7 +79,7 @@ jobs:
- run:
name: Run unittests
command: |
coverage run --branch --source mmcls -m pytest tests/
coverage run --branch --source mmpretrain -m pytest tests/
coverage xml
coverage report -m
@ -114,7 +114,7 @@ jobs:
python -V
pip install torch==<< parameters.torch >>+cpu torchvision==<< parameters.torchvision >>+cpu -f https://download.pytorch.org/whl/torch_stable.html
- run:
name: Install mmcls dependencies
name: Install mmpretrain dependencies
command: |
pip install git+https://github.com/open-mmlab/mmengine.git@main
pip install -U openmim
@ -128,7 +128,7 @@ jobs:
- run:
name: Run unittests
command: |
coverage run --branch --source mmcls -m pytest tests/
coverage run --branch --source mmpretrain -m pytest tests/
coverage xml
coverage report -m
@ -155,24 +155,24 @@ jobs:
- run:
name: Build Docker image
command: |
docker build .circleci/docker -t mmcls: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:/mmcls -v /home/circleci/mmengine:/mmengine -w /mmcls --name mmcls mmcls:gpu
docker build .circleci/docker -t mmpretrain: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:/mmpretrain -v /home/circleci/mmengine:/mmengine -w /mmpretrain --name mmpretrain mmpretrain:gpu
- run:
name: Install mmcls dependencies
name: Install mmpretrain dependencies
command: |
docker exec mmcls pip install -e /mmengine
docker exec mmcls pip install -U openmim
docker exec mmcls mim install 'mmcv >= 2.0.0rc1'
docker exec mmcls pip install -r requirements.txt
docker exec mmcls python -c 'import mmcv; print(mmcv.__version__)'
docker exec mmpretrain pip install -e /mmengine
docker exec mmpretrain pip install -U openmim
docker exec mmpretrain mim install 'mmcv >= 2.0.0rc1'
docker exec mmpretrain pip install -r requirements.txt
docker exec mmpretrain python -c 'import mmcv; print(mmcv.__version__)'
- run:
name: Build and install
command: |
docker exec mmcls pip install -e .
docker exec mmpretrain pip install -e .
- run:
name: Run unittests
command: |
docker exec mmcls python -m pytest tests/
docker exec mmpretrain python -m pytest tests/
# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows

View File

@ -12,7 +12,7 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Build MMClassification
- name: Build MMPretrain
run: |
pip install wheel
python setup.py sdist bdist_wheel

View File

@ -24,4 +24,4 @@ jobs:
- name: Check docstring coverage
run: |
pip install interrogate
interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-magic --ignore-regex "__repr__" --fail-under 60 mmcls
interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-magic --ignore-regex "__repr__" --fail-under 60 mmpretrain

View File

@ -35,7 +35,7 @@ jobs:
run: pip install pip --upgrade
- 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 mmcls dependencies
- name: Install mmpretrain dependencies
run: |
pip install git+https://github.com/open-mmlab/mmengine.git@main
pip install -U openmim
@ -45,7 +45,7 @@ jobs:
run: pip install -e .
- name: Run unittests and generate coverage report
run: |
coverage run --branch --source mmcls -m pytest tests/
coverage run --branch --source mmpretrain -m pytest tests/
coverage xml
coverage report -m
# Upload coverage report for python3.7 && pytorch1.8.1 cpu
@ -74,7 +74,7 @@ jobs:
run: python -m pip install pip --upgrade
- name: Install PyTorch
run: pip install torch==1.8.2+${{matrix.platform}} torchvision==0.9.2+${{matrix.platform}} -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
- name: Install mmcls dependencies
- name: Install mmpretrain dependencies
run: |
pip install git+https://github.com/open-mmlab/mmengine.git@main
pip install -U openmim

View File

@ -12,7 +12,7 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Build MMClassification
- name: Build MMPretrain
run: |
pip install wheel
python setup.py sdist bdist_wheel

View File

@ -41,4 +41,4 @@ jobs:
- name: Build and install
run: mim install -e .
- name: test commands of mim
run: mim search mmcls
run: mim search mmpretrain