Skip to content

Commit

Permalink
Test 1.x (#3356)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiexinch committed Sep 27, 2023
1 parent ff95416 commit 70c7ca6
Show file tree
Hide file tree
Showing 602 changed files with 33,117 additions and 2,730 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ workflows:
tools/.* lint_only false
configs/.* lint_only false
.circleci/.* lint_only false
base-revision: dev-1.x
base-revision: main
# this is the path of the configuration we should trigger once
# path filtering and pipeline parameter value updates are
# complete. In this case, we are using the parent dynamic
Expand Down
40 changes: 20 additions & 20 deletions .circleci/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,19 @@ jobs:
command: |
pip install git+https://github.com/open-mmlab/mmengine.git@main
pip install -U openmim
mim install 'mmcv>=2.0.0rc4'
pip install git+https://github.com/open-mmlab/[email protected]
pip install git+https://github.com/open-mmlab/[email protected]
mim install mmcv>=2.0.0
pip install mmpretrain>=1.0.0rc7
pip install mmdet>=3.0.0
pip install -r requirements/tests.txt -r requirements/optional.txt
python -m pip install albumentations>=0.3.2 --no-binary qudida,albumentations
- run:
name: Build and install
command: |
pip install -e .
- run:
name: Skip timm unittests and generate coverage report
command: |
python -m coverage run --branch --source mmseg -m pytest tests/ --ignore tests/test_models/test_backbones/test_timm_backbone.py
python -m coverage run --branch --source mmseg -m pytest tests/ --ignore tests/test_models/test_backbones/test_timm_backbone.py --ignore tests/test_apis/test_rs_inferencer.py
python -m coverage xml
python -m coverage report -m
build_cuda:
Expand All @@ -96,30 +97,31 @@ jobs:
name: Clone Repos
command: |
git clone -b main --depth 1 https://github.com/open-mmlab/mmengine.git /home/circleci/mmengine
git clone -b dev-1.x --depth 1 https://github.com/open-mmlab/mmclassification.git /home/circleci/mmclassification
git clone -b dev-3.x --depth 1 https://github.com/open-mmlab/mmdetection.git /home/circleci/mmdetection
- run:
name: Build Docker image
command: |
docker build .circleci/docker -t mmseg: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:/mmseg -v /home/circleci/mmengine:/mmengine -v /home/circleci/mmclassification:/mmclassification -v /home/circleci/mmdetection:/mmdetection -w /mmseg --name mmseg mmseg:gpu
docker run --gpus all -t -d -v /home/circleci/project:/mmseg -v /home/circleci/mmengine:/mmengine -v /home/circleci/mmpretrain:/mmpretrain -v /home/circleci/mmdetection:/mmdetection -w /mmseg --name mmseg mmseg:gpu
- run:
name: Install mmseg dependencies
command: |
docker exec mmseg pip install -e /mmengine
docker exec mmseg pip install -U openmim
docker exec mmseg mim install 'mmcv>=2.0.0rc4'
docker exec mmseg pip install -e /mmclassification
docker exec mmseg pip install -e /mmdetection
docker exec mmseg mim install mmcv>=2.0.0
docker exec mmseg pip install mmpretrain>=1.0.0rc7
docker exec mmseg mim install mmdet>=3.0.0
docker exec mmseg apt-get update
docker exec mmseg apt-get install -y git
docker exec mmseg pip install -r requirements/tests.txt -r requirements/optional.txt
docker exec mmseg python -m pip install albumentations>=0.3.2 --no-binary qudida,albumentations
- run:
name: Build and install
command: |
docker exec mmseg pip install -e .
- run:
name: Run unittests but skip timm unittests
command: |
docker exec mmseg pytest tests/ --ignore tests/test_models/test_backbones/test_timm_backbone.py
docker exec mmseg pytest tests/ --ignore tests/test_models/test_backbones/test_timm_backbone.py --ignore tests/test_models/test_backbones/test_timm_backbone.py --ignore tests/test_apis/test_rs_inferencer.py
workflows:
pr_stage_lint:
when: << pipeline.parameters.lint_only >>
Expand All @@ -130,8 +132,7 @@ workflows:
branches:
ignore:
- dev-1.x
- 1.x
- master
- main
pr_stage_test:
when:
not:
Expand All @@ -143,12 +144,11 @@ workflows:
branches:
ignore:
- dev-1.x
- 1.x
- master
- main
- build_cpu:
name: minimum_version_cpu
torch: 1.6.0
torchvision: 0.7.0
torch: 1.8.1
torchvision: 0.9.1
python: "3.7"
requires:
- lint
Expand Down Expand Up @@ -179,12 +179,12 @@ workflows:
jobs:
- build_cuda:
name: minimum_version_gpu
torch: 1.6.0
torch: 1.8.1
# Use double quotation mark to explicitly specify its type
# as string instead of number
cuda: "10.1"
cuda: "10.2"
filters:
branches:
only:
- dev-1.x
- 1.x
- main
File renamed without changes.
File renamed without changes.
File renamed without changes.
57 changes: 57 additions & 0 deletions .dev_scripts/benchmark_full_models.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
ann/ann_r50-d8_4xb2-40k_cityscapes-512x1024.py
apcnet/apcnet_r50-d8_4xb4-80k_ade20k-512x512.py
beit/beit-large_upernet_8xb1-amp-160k_ade20k-640x640.py
bisenetv1/bisenetv1_r18-d32_4xb4-160k_coco-stuff164k-512x512.py
bisenetv2/bisenetv2_fcn_4xb4-ohem-160k_cityscapes-1024x1024.py
ccnet/ccnet_r50-d8_4xb2-40k_cityscapes-512x1024.py
cgnet/cgnet_fcn_4xb4-60k_cityscapes-680x680.py
convnext/convnext-tiny_upernet_8xb2-amp-160k_ade20k-512x512.py
danet/danet_r50-d8_4xb2-40k_cityscapes-512x1024.py
deeplabv3/deeplabv3_r50-d8_4xb2-40k_cityscapes-512x1024.py
deeplabv3plus/deeplabv3plus_r101-d8_4xb2-40k_cityscapes-769x769.py
dmnet/dmnet_r50-d8_4xb2-40k_cityscapes-512x1024.py
dnlnet/dnl_r50-d8_4xb2-40k_cityscapes-512x1024.py
dpt/dpt_vit-b16_8xb2-160k_ade20k-512x512.py
emanet/eemanet_r50-d8_4xb2-80k_cityscapes-512x1024.py
encnet/encnet_r50-d8_4xb4-80k_ade20k-512x512.py
erfnet/erfnet_fcn_4xb4-160k_cityscapes-512x1024.py
fastfcn/fastfcn_r50-d32_jpu_aspp_4xb2-80k_cityscapes-512x1024.py
fastscnn/fast_scnn_8xb4-160k_cityscapes-512x1024.py
fcn/fcn_r50-d8_4xb2-40k_cityscapes-512x1024.py
gcnet/gcnet_r50-d8_4xb2-40k_cityscapes-769x769.py
hrnet/fcn_hr18s_4xb4-80k_ade20k-512x512.py
icnet/icnet_r50-d8_4xb2-80k_cityscapes-832x832.py
isanet/isanet_r50-d8_4xb2-80k_cityscapes-512x1024.py
knet/knet-s3_swin-l_upernet_8xb2-adamw-80k_ade20k-640x640.py
mae/mae-base_upernet_8xb2-amp-160k_ade20k-512x512.py
mask2former/mask2former_r50_8xb2-90k_cityscapes-512x1024.py
mask2former/mask2former_swin-t_8xb2-90k_cityscapes-512x1024.py
mask2former/mask2former_swin-s_8xb2-160k_ade20k-512x512.py
mask2former/mask2former_swin-l-in22k-384x384-pre_8xb2-160k_ade20k-640x640.py
maskformer/maskformer_r50-d32_8xb2-160k_ade20k-512x512.py
maskformer/maskformer_r101-d32_8xb2-160k_ade20k-512x512.py
maskformer/maskformer_swin-t_upernet_8xb2-160k_ade20k-512x512.py
maskformer/maskformer_swin-s_upernet_8xb2-160k_ade20k-512x512.py
mobilenet_v2/mobilenet-v2-d8_pspnet_4xb2-80k_cityscapes-512x1024.py
mobilenet_v3/mobilenet-v3-d8-scratch_lraspp_4xb4-320k_cityscapes-512x1024.py
nonlocal_net/nonlocal_r50-d8_4xb2-40k_cityscapes-512x1024.py
ocrnet/ocrnet_hr18_4xb4-80k_ade20k-512x512.py
pidnet/pidnet-l_2xb6-120k_1024x1024-cityscapes.py
point_rend/pointrend_r50_4xb2-80k_cityscapes-512x1024.py
poolformer/fpn_poolformer_m48_8xb4-40k_ade20k-512x512.py
psanet/psanet_r101-d8_4xb4-80k_ade20k-512x512.py
pspnet/pspnet_r50-d8-rsb_4xb2-adamw-80k_cityscapes-512x1024.py
resnest/resnest_s101-d8_deeplabv3_4xb4-160k_ade20k-512x512.py
segformer/segformer_mit-b5_8xb1-160k_cityscapes-1024x1024.py
segformer/segformer_mit-b5_8xb2-160k_ade20k-512x512.py
segmenter/segmenter_vit-t_mask_8xb1-160k_ade20k-512x512.py
segnext/segnext_mscan-t_1xb16-adamw-160k_ade20k-512x512.py
sem_fpn/fpn_r101_4xb2-80k_cityscapes-512x1024.py
setr/setr_vit-l-mla_8xb1-160k_ade20k-512x512.py
stdc/stdc1_in1k-pre_4xb12-80k_cityscapes-512x1024.py
swin/swin-small-patch4-window7-in1k-pre_upernet_8xb2-160k_ade20k-512x512.py
twins/twins_pcpvt-s_uperhead_8xb4-160k_ade20k-512x512.py
unet/unet-s5-d16_fcn_4xb4-160k_cityscapes-512x1024.py
upernet/upernet_r50_4xb2-40k_cityscapes-769x769.py
vit/vit_deit-s16_upernet_8xb2-80k_ade20k-512x512.py
san/san-vit-b16_coco-stuff164k-640x640.py
File renamed without changes.
10 changes: 10 additions & 0 deletions .dev_scripts/benchmark_options.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
third_part_libs = [
'pip install mmengine',
'pip install mmcv>=2.0.0',
'pip install mmcls==1.0.0rc6',
'pip install mmdet==3.0.0',
'pip install -r requirements.txt',
'pip install timm',
]

default_floating_range = 0.5
File renamed without changes.
26 changes: 26 additions & 0 deletions .dev_scripts/benchmark_train_models.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
bisenetv1/bisenetv1_r18-d32_4xb4-160k_coco-stuff164k-512x512.py
bisenetv2/bisenetv2_fcn_4xb4-ohem-160k_cityscapes-1024x1024.py
deeplabv3/deeplabv3_r50-d8_4xb2-40k_cityscapes-512x1024.py
deeplabv3/deeplabv3_r101-d8_4xb4-160k_ade20k-512x512.py
deeplabv3plus/deeplabv3plus_r101-d8_4xb2-40k_cityscapes-769x769.py
deeplabv3plus/deeplabv3plus_r50-d8_4xb4-80k_ade20k-512x512.py
hrnet/fcn_hr18s_4xb4-80k_ade20k-512x512.py
hrnet/fcn_hr18_4xb2-160k_cityscapes-512x1024.py
knet/knet-s3_swin-l_upernet_8xb2-adamw-80k_ade20k-512x512.py
knet/knet-s3_r50-d8_pspnet_8xb2-adamw-80k_ade20k-512x512.py
mae/mae-base_upernet_8xb2-amp-160k_ade20k-512x512.py
mask2former/mask2former_swin-l-in22k-384x384-pre_8xb2-160k_ade20k-640x640.py
maskformer/maskformer_swin-s_upernet_8xb2-160k_ade20k-512x512.py
mobilenet_v2/mobilenet-v2-d8_deeplabv3_4xb2-80k_cityscapes-512x1024.py
ocrnet/ocrnet_hr48_4xb4-80k_ade20k-512x512.py
pidnet/pidnet-m_2xb6-120k_1024x1024-cityscapes.py
pspnet/pspnet_r50-d8-rsb_4xb2-adamw-80k_cityscapes-512x1024.py
pspnet/pspnet_r101-d8_4xb4-80k_ade20k-512x512.py
segformer/segformer_mit-b5_8xb2-160k_ade20k-512x512.py
segmenter/segmenter_vit-t_mask_8xb1-160k_ade20k-512x512.py
segnext/segnext_mscan-t_1xb16-adamw-160k_ade20k-512x512.py
swin/swin-base-patch4-window12-in22k-384x384-pre_upernet_8xb2-160k_ade20k-512x512.py
twins/twins_pcpvt-l_uperhead_8xb2-160k_ade20k-512x512.py
unet/unet-s5-d16_fcn_4xb4-160k_cityscapes-512x1024.py
upernet/upernet_r101_4xb2-40k_cityscapes-512x1024.py
san/san-vit-b16_coco-stuff164k-640x640.py
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def parse_args():
parser.add_argument(
'--out',
type=str,
default='.dev/benchmark_evaluation.sh',
default='.dev_scripts/benchmark_evaluation.sh',
help='path to save model benchmark script')

args = parser.parse_args()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def parse_args():
parser.add_argument(
'--out',
type=str,
default='.dev/benchmark_train.sh',
default='.dev_scripts/benchmark_train.sh',
help='path to save model benchmark script')

args = parser.parse_args()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ def get_model_info(md_file: str, config_dir: str,
if line.startswith('<!-- [DATASET]'):
is_dataset = True

if '<!-- [SKIP DEV CHECK] -->' in line:
return None, None

# get dataset names
if line.startswith('###'):
current_dataset = line.split('###')[1].strip()
Expand Down Expand Up @@ -279,14 +282,20 @@ def update_model_index(config_dir_list: List[str]) -> bool:
collection_name_list: List[str] = get_collection_name_list(md_file_list)
# hard code to add 'FPN'
collection_name_list.append('FPN')
remove_config_dir_list = []
# parse md file
for md_file, config_dir in zip(md_file_list, config_dir_list):
results, collection_name = get_model_info(md_file, config_dir,
collection_name_list)
if results is None:
remove_config_dir_list.append(config_dir)
continue
filename = osp.join(config_dir, 'metafile.yaml')
file_modified |= dump_yaml_and_check_difference(results, filename)
if collection_name != '':
collection_name_list.append(collection_name)

# remove config dir
for config_dir in remove_config_dir_list:
config_dir_list.remove(config_dir)
file_modified |= update_model_index(config_dir_list)
sys.exit(1 if file_modified else 0)
File renamed without changes.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ concurrency:

jobs:
build-n-publish:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: startsWith(github.event.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python 3.7
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Build MMSegmentation
Expand Down
27 changes: 0 additions & 27 deletions .github/workflows/lint.yml

This file was deleted.

Loading

0 comments on commit 70c7ca6

Please sign in to comment.