-
Notifications
You must be signed in to change notification settings - Fork 756
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [CI] Add CI * update init * fix lint * fix lint * fix linting * fix linting * fix linting * fix * fix * fix * fix * fix * fix * disable github ci * fix * Update .circleci/test.yml Co-authored-by: Qing Jiang <[email protected]> * fix * fix Co-authored-by: Qing Jiang <[email protected]>
- Loading branch information
1 parent
e303404
commit 6f30020
Showing
67 changed files
with
1,527 additions
and
1,413 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ jobs: | |
name: Check docstring coverage | ||
command: | | ||
pip install interrogate | ||
interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-regex "__repr__" --fail-under 50 mmocr | ||
interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-magic --ignore-regex "__repr__" --fail-under 90 mmocr | ||
build_cpu: | ||
parameters: | ||
# The python version must match available image tags in | ||
|
@@ -36,16 +36,13 @@ jobs: | |
type: string | ||
torchvision: | ||
type: string | ||
mmcv: | ||
type: string | ||
docker: | ||
- image: cimg/python:<< parameters.python >> | ||
resource_class: large | ||
steps: | ||
- checkout | ||
- run: | ||
name: Get MMCV_TORCH as environment variables | ||
command: | | ||
. .circleci/scripts/get_mmcv_var.sh << parameters.torch >> | ||
source $BASH_ENV | ||
- run: | ||
name: Install Libraries | ||
command: | | ||
|
@@ -64,8 +61,9 @@ jobs: | |
- run: | ||
name: Install mmocr dependencies | ||
command: | | ||
python -m pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cpu/torch${MMCV_TORCH}/index.html | ||
python -m pip install mmdet | ||
python -m pip install git+ssh://[email protected]/open-mmlab/mmengine.git@main | ||
python -m pip install << parameters.mmcv >> | ||
python -m pip install git+ssh://[email protected]/open-mmlab/[email protected] | ||
python -m pip install -r requirements.txt | ||
- run: | ||
name: Build and install | ||
|
@@ -77,7 +75,6 @@ jobs: | |
python -m coverage run --branch --source mmocr -m pytest tests/ | ||
python -m coverage xml | ||
python -m coverage report -m | ||
build_cuda: | ||
parameters: | ||
torch: | ||
|
@@ -88,27 +85,31 @@ jobs: | |
cudnn: | ||
type: integer | ||
default: 7 | ||
mmcv: | ||
type: string | ||
machine: | ||
image: ubuntu-2004-cuda-11.4:202110-01 | ||
docker_layer_caching: true | ||
# docker_layer_caching: true | ||
resource_class: gpu.nvidia.small | ||
steps: | ||
- checkout | ||
- run: | ||
name: Get MMCV_TORCH and MMCV_CUDA as environment variables | ||
# Cloning repos in VM since Docker doesn't have access to the private key | ||
name: Clone Repos | ||
command: | | ||
. .circleci/scripts/get_mmcv_var.sh << parameters.torch >> << parameters.cuda >> | ||
source $BASH_ENV | ||
git clone -b main --depth 1 ssh://[email protected]/open-mmlab/mmengine.git /home/circleci/mmengine | ||
git clone -b dev-3.x --depth 1 ssh://[email protected]/open-mmlab/mmdetection.git /home/circleci/mmdetection | ||
- run: | ||
name: Build Docker image | ||
command: | | ||
docker build .circleci/docker -t mmocr: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:/mmocr -w /mmocr --name mmocr mmocr:gpu | ||
docker run --gpus all -t -d -v /home/circleci/project:/mmocr -v /home/circleci/mmengine:/mmengine -v /home/circleci/mmdetection:/mmdetection -w /mmocr --name mmocr mmocr:gpu | ||
- run: | ||
name: Install mmocr dependencies | ||
command: | | ||
docker exec mmocr pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/${MMCV_CUDA}/torch${MMCV_TORCH}/index.html | ||
docker exec mmocr pip install mmdet | ||
docker exec mmocr pip install -e /mmengine | ||
docker exec mmocr pip install << parameters.mmcv >> | ||
docker exec mmocr pip install -e /mmdetection | ||
docker exec mmocr pip install -r requirements.txt | ||
- run: | ||
name: Build and install | ||
|
@@ -118,7 +119,6 @@ jobs: | |
name: Run unittests | ||
command: | | ||
docker exec mmocr python -m pytest tests/ | ||
workflows: | ||
pr_stage_lint: | ||
when: << pipeline.parameters.lint_only >> | ||
|
@@ -128,7 +128,7 @@ workflows: | |
filters: | ||
branches: | ||
ignore: | ||
- main | ||
- dev-1.x | ||
pr_stage_test: | ||
when: | ||
not: | ||
|
@@ -139,19 +139,21 @@ workflows: | |
filters: | ||
branches: | ||
ignore: | ||
- main | ||
- dev-1.x | ||
- build_cpu: | ||
name: minimum_version_cpu | ||
torch: 1.6.0 | ||
torchvision: 0.7.0 | ||
python: 3.6.9 # The lowest python 3.6.x version available on CircleCI images | ||
mmcv: https://download.openmmlab.com/mmcv/dev-2.x/cpu/torch1.6.0/mmcv_full-2.0.0rc0-cp36-cp36m-manylinux1_x86_64.whl | ||
requires: | ||
- lint | ||
- build_cpu: | ||
name: maximum_version_cpu | ||
torch: 1.9.0 | ||
torchvision: 0.10.0 | ||
python: 3.9.0 | ||
mmcv: https://download.openmmlab.com/mmcv/dev-2.x/cpu/torch1.9.0/mmcv_full-2.0.0rc0-cp39-cp39-manylinux1_x86_64.whl | ||
requires: | ||
- minimum_version_cpu | ||
- hold: | ||
|
@@ -164,6 +166,7 @@ workflows: | |
# Use double quotation mark to explicitly specify its type | ||
# as string instead of number | ||
cuda: "10.2" | ||
mmcv: https://download.openmmlab.com/mmcv/dev-2.x/cu102/torch1.8.0/mmcv_full-2.0.0rc0-cp37-cp37m-manylinux1_x86_64.whl | ||
requires: | ||
- hold | ||
merge_stage_test: | ||
|
@@ -176,8 +179,9 @@ workflows: | |
torch: 1.6.0 | ||
# Use double quotation mark to explicitly specify its type | ||
# as string instead of number | ||
mmcv: https://download.openmmlab.com/mmcv/dev-2.x/cu101/torch1.6.0/mmcv_full-2.0.0rc0-cp37-cp37m-manylinux1_x86_64.whl | ||
cuda: "10.1" | ||
filters: | ||
branches: | ||
only: | ||
- main | ||
- dev-1.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,4 @@ about: Ask general questions to get help | |
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.