Skip to content

Commit 386be93

Browse files
yinweisuzhresholdbryanyzhuArthurlxyECHO960
authored
Github Actions for CI (#1541)
* [WIP] Github Actions (#1) * incorporate autodatasets (#1496) * Add torch clarification (#1495) * Add torch clarification * fix * Fix auto detectors (#1497) * fix yolo predictor * fix predict * fix config (#1498) * Added support for AWS Batch. Added support for docker (#1474) * Added support for AWS Batch. Added support for docker * Fixed style. Removed code in commet. Updated README to include boto3 usage * Renamed template file. Removed gluon aws id * fix readme * fix * fix imports (#1499) * fix imports * fix * fix image classification * fix * fix width height * fix * fix batch size * fix * fix * none to empty string (#1502) * [WIP] Tinycoco (#1501) * Add minicoco * update jenkins for minicoco * fix * renamed mini to tiny * fix * fix * fix, add VOCDetectionTiny * fix * fix env * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * test * test * test * clean up Co-authored-by: Joshua Z. Zhang <cheungchih@gmail.com> * Fix rcnn target generator (#1508) * fix not used rcnn target generator * fix lint * fix * fix * add get flops (#1509) * warmup scheduler for video torch (#1510) 1. refine warmup logic, now using cfg.CONFIG.TRAIN.USE_WARMUP to control open warmup or not. 2. fix bug in gluoncv/torch/utils/lr_policy.py 3. change training configs 4. change ddp_train_pytorch and ddp_train_shortonly_pytorch, This is tested on ec2 machines * update torchvideo model zoo (#1513) * add ir-csn-152 into torchvideo model zoo (#1515) * Revise danet.py (#1507) The dropout layer should be placed before the classification layer. * icnet missing background class (#1518) * Add CSN model to torch video model zoo (#1517) * add ircsn * update model zoo * fix lint * Improve auto tasks (#1523) * use in-memory pickle instead of disk file * add feature extractor for image classification * add tests * fix * fix lint * more unittests * fix * fix * Added github action and workflow for sanity check * Removed container and actions. * Added unit test * Added build docs * Fix * Fix * Fix * Fix * Test * test * Update unit test * fix * fix * fix * fix * fix * fix * fix * subclass coco * fix * fix * fix * fix * rebase conflict * fix rebase * fix * fix * add aws authentication * add aws authentication * test * test * test * test * test * fix log * test * test * test * test * test * test * fix * rebase * add tiny motorbike * fix * model zoo * test * fix docker * parallel jobs * parallel jobs * fix * add torch * add torch * fix * fix * fix * full test * full test * test build docs * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * test branch * test branch * fix * test * test * add comment Co-authored-by: Joshua Z. Zhang <cheungchih@gmail.com> Co-authored-by: Yi Zhu <yizhu59@gmail.com> Co-authored-by: Xinyu Li <lixinyu.arthur@outlook.com> Co-authored-by: Chunhui Liu <chunhuiliu960@gmail.com> Co-authored-by: YANYI ZHANG <yz593@scarletmail.rutgers.edu> Co-authored-by: BebDong <BebDong@users.noreply.github.com> Co-authored-by: Kuang Haofei <haofeikuang@gmail.com> * [WIP] Test PR (#3) * Added github action and workflow for sanity check * Removed container and actions. * Added unit test * Added build docs * Fix * Fix * Fix * Fix * Test * test * Update unit test * fix * fix * fix * fix * fix * fix * fix * subclass coco * fix * fix * fix * fix * rebase conflict * fix rebase * fix * fix * add aws authentication * add aws authentication * test * test * test * test * test * fix log * test * test * test * test * test * test * fix * rebase * add tiny motorbike * fix * model zoo * test * fix docker * parallel jobs * parallel jobs * fix * add torch * add torch * fix * fix * fix * full test * full test * test build docs * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * test branch * test branch * fix * test * test * add comment * test * full test * full test * full test * test (#5) * test * fix * change to 12x * test comments * change to pr_target * [WIP] Full Test (#6) * full test * test model zoo * test model zoo * full test * full test * add auto * add gpu_test.sh * test efs modelzoo * test efs modelzoo * test efs modelzoo * test without auto * test repo name * test repo name * test repo name * test repo name * test sharemem * full test (#8) * [WIP] Github Actions (#1) * incorporate autodatasets (#1496) * Add torch clarification (#1495) * Add torch clarification * fix * Fix auto detectors (#1497) * fix yolo predictor * fix predict * fix config (#1498) * Added support for AWS Batch. Added support for docker (#1474) * Added support for AWS Batch. Added support for docker * Fixed style. Removed code in commet. Updated README to include boto3 usage * Renamed template file. Removed gluon aws id * fix readme * fix * fix imports (#1499) * fix imports * fix * fix image classification * fix * fix width height * fix * fix batch size * fix * fix * none to empty string (#1502) * [WIP] Tinycoco (#1501) * Add minicoco * update jenkins for minicoco * fix * renamed mini to tiny * fix * fix * fix, add VOCDetectionTiny * fix * fix env * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * test * test * test * clean up Co-authored-by: Joshua Z. Zhang <cheungchih@gmail.com> * Fix rcnn target generator (#1508) * fix not used rcnn target generator * fix lint * fix * fix * add get flops (#1509) * warmup scheduler for video torch (#1510) 1. refine warmup logic, now using cfg.CONFIG.TRAIN.USE_WARMUP to control open warmup or not. 2. fix bug in gluoncv/torch/utils/lr_policy.py 3. change training configs 4. change ddp_train_pytorch and ddp_train_shortonly_pytorch, This is tested on ec2 machines * update torchvideo model zoo (#1513) * add ir-csn-152 into torchvideo model zoo (#1515) * Revise danet.py (#1507) The dropout layer should be placed before the classification layer. * icnet missing background class (#1518) * Add CSN model to torch video model zoo (#1517) * add ircsn * update model zoo * fix lint * Improve auto tasks (#1523) * use in-memory pickle instead of disk file * add feature extractor for image classification * add tests * fix * fix lint * more unittests * fix * fix * Added github action and workflow for sanity check * Removed container and actions. * Added unit test * Added build docs * Fix * Fix * Fix * Fix * Test * test * Update unit test * fix * fix * fix * fix * fix * fix * fix * subclass coco * fix * fix * fix * fix * rebase conflict * fix rebase * fix * fix * add aws authentication * add aws authentication * test * test * test * test * test * fix log * test * test * test * test * test * test * fix * rebase * add tiny motorbike * fix * model zoo * test * fix docker * parallel jobs * parallel jobs * fix * add torch * add torch * fix * fix * fix * full test * full test * test build docs * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * test branch * test branch * fix * test * test * add comment Co-authored-by: Joshua Z. Zhang <cheungchih@gmail.com> Co-authored-by: Yi Zhu <yizhu59@gmail.com> Co-authored-by: Xinyu Li <lixinyu.arthur@outlook.com> Co-authored-by: Chunhui Liu <chunhuiliu960@gmail.com> Co-authored-by: YANYI ZHANG <yz593@scarletmail.rutgers.edu> Co-authored-by: BebDong <BebDong@users.noreply.github.com> Co-authored-by: Kuang Haofei <haofeikuang@gmail.com> * [WIP] Test PR (#3) * Added github action and workflow for sanity check * Removed container and actions. * Added unit test * Added build docs * Fix * Fix * Fix * Fix * Test * test * Update unit test * fix * fix * fix * fix * fix * fix * fix * subclass coco * fix * fix * fix * fix * rebase conflict * fix rebase * fix * fix * add aws authentication * add aws authentication * test * test * test * test * test * fix log * test * test * test * test * test * test * fix * rebase * add tiny motorbike * fix * model zoo * test * fix docker * parallel jobs * parallel jobs * fix * add torch * add torch * fix * fix * fix * full test * full test * test build docs * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * test branch * test branch * fix * test * test * add comment * test * full test * full test * full test * test (#5) * test * fix * change to 12x * test comments * change to pr_target * [WIP] Full Test (#6) * full test * test model zoo * test model zoo * full test * full test * add auto * add gpu_test.sh * test efs modelzoo * test efs modelzoo * test efs modelzoo * test without auto * test repo name * test repo name * test repo name * test repo name * test sharemem * test pr only on yinweisu * test pr only on yinweisu * update repo name * test pr only on yinweisu (#9) * full test on pr only yinweisu (#10) * ready to pr * fix * change doc env name * add torch to env * add yacs to env * fix path Co-authored-by: Joshua Z. Zhang <cheungchih@gmail.com> Co-authored-by: Yi Zhu <yizhu59@gmail.com> Co-authored-by: Xinyu Li <lixinyu.arthur@outlook.com> Co-authored-by: Chunhui Liu <chunhuiliu960@gmail.com> Co-authored-by: YANYI ZHANG <yz593@scarletmail.rutgers.edu> Co-authored-by: BebDong <BebDong@users.noreply.github.com> Co-authored-by: Kuang Haofei <haofeikuang@gmail.com>
1 parent 1891375 commit 386be93

File tree

10 files changed

+348
-14
lines changed

10 files changed

+348
-14
lines changed

.github/workflows/build_docs.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env bash
2+
3+
BRANCH=$(basename $1)
4+
COMMIT_SHA=$2
5+
GIT_REPO=$3
6+
PR_NUMBER=$4
7+
8+
EFS=/mnt/efs
9+
10+
mkdir -p ~/.mxnet/datasets
11+
for f in $EFS/.mxnet/datasets/*; do
12+
if [ -d "$f" ]; then
13+
# Will not run if no directories are available
14+
ln -s $f ~/.mxnet/datasets/$(basename "$f")
15+
fi
16+
done
17+
18+
python3 -m pip install sphinx>=1.5.5 sphinx-gallery sphinx_rtd_theme matplotlib Image recommonmark scipy mxtheme
19+
20+
export MXNET_CUDNN_AUTOTUNE_DEFAULT=0
21+
cd docs
22+
make html
23+
COMMAND_EXIT_CODE=$?
24+
sed -i.bak 's/33\\,150\\,243/23\\,141\\,201/g' build/html/_static/material-design-lite-1.3.0/material.blue-deep_orange.min.css;
25+
sed -i.bak 's/2196f3/178dc9/g' build/html/_static/sphinx_materialdesign_theme.css;
26+
sed -i.bak 's/pre{padding:1rem;margin:1.5rem\\s0;overflow:auto;overflow-y:hidden}/pre{padding:1rem;margin:1.5rem 0;overflow:auto;overflow-y:scroll}/g' build/html/_static/sphinx_materialdesign_theme.css
27+
28+
if [[ ($BRANCH == master) && ($GIT_REPO == dmlc/gluon-cv) ]]; then
29+
# aws s3 cp s3://gluon-cv.mxnet.io/coverage.svg build/html/coverage.svg
30+
aws s3 sync --delete build/html/ s3://gluoncv-ci/build_docs/master/ --acl public-read --cache-control max-age=7200
31+
# aws s3 cp build/html/coverage.svg s3://gluon-cv.mxnet.io/coverage.svg --acl public-read --cache-control max-age=300
32+
# echo "Uploaded doc to http://gluon-cv.mxnet.io"
33+
echo master
34+
else
35+
# aws s3 cp s3://gluoncv-ci/build_docs/$PR_NUMBER/$COMMIT_SHA/coverage.svg build/html/coverage.svg
36+
aws s3 sync --delete build/html/ s3://gluoncv-ci/build_docs/$PR_NUMBER/$COMMIT_SHA/ --acl public-read
37+
# echo "Uploaded doc to http://gluon-vision-staging.s3-website-us-west-2.amazonaws.com/${env.BRANCH_NAME}/${env.BUILD_NUMBER}/index.html"
38+
echo "Uploaded doc to https://gluoncv-ci.s3-us-west-2.amazonaws.com/build_docs//$PR_NUMBER/$COMMIT_SHA/index.html"
39+
echo $GIT_REPO: $BRANCH
40+
fi;
41+
exit $COMMAND_EXIT_CODE

.github/workflows/ci.yml

Lines changed: 243 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,243 @@
1+
name: CI workflow
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request_target:
7+
jobs:
8+
unittests:
9+
if: ${{ (github.event_name == 'push' && github.repository == 'yinweisu/gluon-cv') || (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name == 'yinweisu/gluon-cv') }}
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [macos-latest, windows-latest, ubuntu-latest]
14+
steps:
15+
- name: Checkout repository(For push)
16+
if: ${{ github.event_name == 'push' }}
17+
uses: actions/checkout@v2
18+
- name: Checkout Pull Request Repository(For pull request)
19+
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
20+
uses: actions/checkout@v2
21+
with:
22+
repository: ${{ github.event.pull_request.head.repo.full_name }}
23+
ref: ${{ github.event.pull_request.head.ref }}
24+
- name: Setup Miniconda
25+
uses: conda-incubator/setup-miniconda@v2.0.0
26+
with:
27+
auto-update-conda: true
28+
python-version: 3.7
29+
- name: sanity-check
30+
shell: bash -l {0}
31+
run: |
32+
conda env create -n gluon_cv_lint -f ./tests/pylint.yml
33+
conda env update -n gluon-cv-lint -f ./tests/pylint.yml --prune
34+
conda activate gluon-cv-lint
35+
conda list
36+
make clean
37+
make pylint
38+
- name: unit-test
39+
shell: bash -l {0}
40+
run: |
41+
conda env create -n gluon_cv_py3_test -f tests/py3_mxnet_ci.yml
42+
conda env update -n gluon_cv_py3_test -f tests/py3_mxnet_ci.yml --prune
43+
conda activate gluon_cv_py3_test
44+
conda list
45+
export CUDA_VISIBLE_DEVICES=0
46+
export KMP_DUPLICATE_LIB_OK=TRUE
47+
make clean
48+
pip install --upgrade --force-reinstall --no-deps .
49+
env
50+
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64
51+
export MPLBACKEND=Agg
52+
export MXNET_CUDNN_AUTOTUNE_DEFAULT=0
53+
export TINY_COCO=~/.mxnet/datasets/tiny_coco
54+
export TINY_MOTORBIKE=~/.mxnet/datasets/tiny_motorbike
55+
mkdir -p $TINY_COCO/annotations
56+
curl -s https://gluoncv-ci.s3-us-west-2.amazonaws.com/mini_coco/sub_val.zip --output sub_val.zip
57+
unzip -q sub_val.zip -d $TINY_COCO
58+
mv $TINY_COCO/sub_val $TINY_COCO/val2017
59+
curl -s https://gluoncv-ci.s3-us-west-2.amazonaws.com/mini_coco/instances_val2017_tiny.json --output instances_val2017_tiny.json
60+
mv instances_val2017_tiny.json $TINY_COCO/annotations
61+
curl -s https://gluoncv-ci.s3-us-west-2.amazonaws.com/tiny_motorbike.zip --output tiny_motorbike.zip
62+
unzip -q tiny_motorbike.zip -d $TINY_MOTORBIKE
63+
nosetests --with-timer --timer-ok 5 --timer-warning 20 -x --with-coverage --cover-package gluoncv -v tests/unittests
64+
model_zoo_mxnet:
65+
if: ${{ (github.event_name == 'push' && github.repository == 'yinweisu/gluon-cv') || (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name == 'yinweisu/gluon-cv') }}
66+
needs: unittests
67+
runs-on: ubuntu-latest
68+
steps:
69+
- name: checkout
70+
uses: actions/checkout@v2
71+
- name: Configure AWS Credentials
72+
uses: aws-actions/configure-aws-credentials@v1
73+
with:
74+
aws-access-key-id: ${{ secrets.GLUONCV_DEV_ACCESS_ID }}
75+
aws-secret-access-key: ${{ secrets.GLUONCV_DEV_SECRET_ACCESS_KEY }}
76+
aws-region: us-east-1
77+
- name: Install dependencies
78+
run: |
79+
pip install --upgrade --force-reinstall --no-deps .
80+
pip install boto3
81+
- name: Test model_zoo_mxnet on AWS Batch(For push)
82+
shell: bash -l {0}
83+
if: ${{ github.event_name == 'push' }}
84+
run: |
85+
echo "Start submitting job"
86+
python ./tools/batch/submit-job.py --region us-east-1 \
87+
--job-type p3.2x \
88+
--name GluonCV-GPU-ModelZooMxnet-${{ github.ref }} \
89+
--source-ref ${{ github.ref }} \
90+
--work-dir . \
91+
--remote https://github.com/${{ github.repository }} \
92+
--command "chmod +x ./.github/workflows/gpu_test.sh && ./.github/workflows/gpu_test.sh gluoncv tests/model_zoo" \
93+
--wait
94+
- name: Test model_zoo_mxnet on AWS Batch(For pull request)
95+
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
96+
run: |
97+
echo "Start submitting job"
98+
python ./tools/batch/submit-job.py --region us-east-1 \
99+
--job-type p3.2x \
100+
--name GluonCV-GPU-ModelZooMxnet-PR#${{ github.event.number }} \
101+
--source-ref ${{ github.event.pull_request.head.ref }} \
102+
--work-dir . \
103+
--remote https://github.com/${{ github.event.pull_request.head.repo.full_name }} \
104+
--command "chmod +x ./.github/workflows/gpu_test.sh && ./.github/workflows/gpu_test.sh gluoncv tests/model_zoo" \
105+
--wait
106+
model_zoo_torch:
107+
if: ${{ (github.event_name == 'push' && github.repository == 'yinweisu/gluon-cv') || (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name == 'yinweisu/gluon-cv') }}
108+
needs: unittests
109+
runs-on: ubuntu-latest
110+
steps:
111+
- name: checkout
112+
uses: actions/checkout@v2
113+
- name: Configure AWS Credentials
114+
uses: aws-actions/configure-aws-credentials@v1
115+
with:
116+
aws-access-key-id: ${{ secrets.GLUONCV_DEV_ACCESS_ID }}
117+
aws-secret-access-key: ${{ secrets.GLUONCV_DEV_SECRET_ACCESS_KEY }}
118+
aws-region: us-east-1
119+
- name: Install dependencies
120+
run: |
121+
pip install --upgrade --force-reinstall --no-deps .
122+
pip install boto3
123+
- name: Test model_zoo_torch on AWS Batch(For push)
124+
shell: bash -l {0}
125+
if: ${{ github.event_name == 'push' }}
126+
run: |
127+
echo "Start submitting job"
128+
python ./tools/batch/submit-job.py --region us-east-1 \
129+
--job-type p3.2x \
130+
--name GluonCV-GPU-ModelZooTorch-${{ github.ref }} \
131+
--source-ref ${{ github.ref }} \
132+
--work-dir . \
133+
--remote https://github.com/${{ github.repository }} \
134+
--command "chmod +x ./.github/workflows/gpu_test.sh && ./.github/workflows/gpu_test.sh gluoncv/torch tests/model_zoo_torch" \
135+
--wait
136+
- name: Test model_zoo_torch on AWS Batch(For pull request)
137+
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
138+
run: |
139+
echo "Start submitting job"
140+
python ./tools/batch/submit-job.py --region us-east-1 \
141+
--job-type p3.2x \
142+
--name GluonCV-GPU-ModelZooTorch-PR#${{ github.event.number }} \
143+
--source-ref ${{ github.event.pull_request.head.ref }} \
144+
--work-dir . \
145+
--remote https://github.com/${{ github.event.pull_request.head.repo.full_name }} \
146+
--command "chmod +x ./.github/workflows/gpu_test.sh && ./.github/workflows/gpu_test.sh gluoncv/torch tests/model_zoo_torch" \
147+
--wait
148+
auto:
149+
if: ${{ (github.event_name == 'push' && github.repository == 'yinweisu/gluon-cv') || (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name == 'yinweisu/gluon-cv') }}
150+
needs: unittests
151+
runs-on: ubuntu-latest
152+
steps:
153+
- name: checkout
154+
uses: actions/checkout@v2
155+
- name: Configure AWS Credentials
156+
uses: aws-actions/configure-aws-credentials@v1
157+
with:
158+
aws-access-key-id: ${{ secrets.GLUONCV_DEV_ACCESS_ID }}
159+
aws-secret-access-key: ${{ secrets.GLUONCV_DEV_SECRET_ACCESS_KEY }}
160+
aws-region: us-east-1
161+
- name: Install dependencies
162+
run: |
163+
pip install --upgrade --force-reinstall --no-deps .
164+
pip install boto3
165+
- name: Test model_zoo_torch on AWS Batch(For push)
166+
shell: bash -l {0}
167+
if: ${{ github.event_name == 'push' }}
168+
run: |
169+
echo "Start submitting job"
170+
python ./tools/batch/submit-job.py --region us-east-1 \
171+
--job-type p3.2x \
172+
--name GluonCV-GPU-Auto-${{ github.ref }} \
173+
--source-ref ${{ github.ref }} \
174+
--work-dir . \
175+
--remote https://github.com/${{ github.repository }} \
176+
--command "chmod +x ./.github/workflows/gpu_test.sh && ./.github/workflows/gpu_test.sh gluoncv tests/auto" \
177+
--wait
178+
- name: Test model_zoo_torch on AWS Batch(For pull request)
179+
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
180+
run: |
181+
echo "Start submitting job"
182+
python ./tools/batch/submit-job.py --region us-east-1 \
183+
--job-type p3.2x \
184+
--name GluonCV-GPU-Auto-PR#${{ github.event.number }} \
185+
--source-ref ${{ github.event.pull_request.head.ref }} \
186+
--work-dir . \
187+
--remote https://github.com/${{ github.event.pull_request.head.repo.full_name }} \
188+
--command "chmod +x ./.github/workflows/gpu_test.sh && ./.github/workflows/gpu_test.sh gluoncv tests/auto" \
189+
--wait
190+
build-docs:
191+
if: ${{ (github.event_name == 'push' && github.repository == 'yinweisu/gluon-cv') || (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name == 'yinweisu/gluon-cv') }}
192+
needs: [unittests, model_zoo_mxnet, model_zoo_torch, auto]
193+
runs-on: ubuntu-latest
194+
steps:
195+
- name: checkout
196+
uses: actions/checkout@v2
197+
- name: Configure AWS Credentials
198+
uses: aws-actions/configure-aws-credentials@v1
199+
with:
200+
aws-access-key-id: ${{ secrets.GLUONCV_DEV_ACCESS_ID }}
201+
aws-secret-access-key: ${{ secrets.GLUONCV_DEV_SECRET_ACCESS_KEY }}
202+
aws-region: us-east-1
203+
- name: Install dependencies
204+
run: |
205+
pip install --upgrade --force-reinstall --no-deps .
206+
pip install boto3
207+
- name: Set SHA outputs
208+
id: vars
209+
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
210+
- name: Build docs on AWS Batch(For push)
211+
shell: bash -l {0}
212+
if: ${{ github.event_name == 'push' }}
213+
run: |
214+
echo "Start submitting job"
215+
python ./tools/batch/submit-job.py --region us-east-1 \
216+
--job-type p3.2x \
217+
--name GluonCV-GPU-BuildDocs-${{ github.ref }} \
218+
--source-ref ${{ github.ref }} \
219+
--work-dir . \
220+
--remote https://github.com/${{ github.repository }} \
221+
--command "chmod +x ./.github/workflows/build_docs.sh && ./.github/workflows/build_docs.sh ${{ github.ref }} ${{ steps.vars.outputs.sha_short }} ${{ github.repository }} ${{ github.event.number }}" \
222+
--wait
223+
- name: Build docs on AWS Batch(For pull request)
224+
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
225+
run: |
226+
echo "Start submitting job"
227+
python ./tools/batch/submit-job.py --region us-east-1 \
228+
--job-type p3.2x \
229+
--name GluonCV-GPU-BuildDocs-PR#${{ github.event.number }} \
230+
--source-ref ${{ github.event.pull_request.head.ref }} \
231+
--work-dir . \
232+
--remote https://github.com/${{ github.event.pull_request.head.repo.full_name }} \
233+
--command "chmod +x ./.github/workflows/build_docs.sh && ./.github/workflows/build_docs.sh ${{ github.event.pull_request.head.ref }} ${{ steps.vars.outputs.sha_short }} ${{ github.event.pull_request.head.repo.full_name }} ${{ github.event.number }} " \
234+
--wait
235+
- name: Comment on PR
236+
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
237+
uses: peter-evans/create-or-update-comment@v1.4.3
238+
with:
239+
issue-number: ${{ github.event.number }}
240+
body: |
241+
Job ${{ github.event.number }}-${{ steps.vars.outputs.sha_short }} is done.
242+
Docs are uploaded to http://gluon-vision-staging.s3-website-us-west-2.amazonaws.com/${{ github.event.number }}/${{ steps.vars.outputs.sha_short }}/index.html
243+

.github/workflows/gpu_test.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
COVER_PACKAGE=$1
4+
TESTS_PATH=$2
5+
6+
EFS=/mnt/efs
7+
8+
mkdir -p ~/.mxnet/models
9+
for f in $EFS/.mxnet/models/*.params; do
10+
ln -s $f ~/.mxnet/models/$(basename "$f")
11+
done
12+
13+
export MXNET_CUDNN_AUTOTUNE_DEFAULT=0
14+
export MPLBACKEND=Agg
15+
export KMP_DUPLICATE_LIB_OK=TRUE
16+
nosetests --with-timer --timer-ok 5 --timer-warning 20 -x --with-coverage --cover-package $COVER_PACKAGE -v $TESTS_PATH

Jenkinsfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ stage("Build Docs") {
135135
checkout scm
136136
VISIBLE_GPU=env.EXECUTOR_NUMBER.toInteger() % 8
137137
sh """#!/bin/bash
138-
conda env remove -n gluon_vision_docs -y
138+
conda env remove -n gluon_cv_docs -y
139139
set -ex
140-
conda env create -n gluon_vision_docs -f docs/build.yml
141-
conda env update -n gluon_vision_docs -f docs/build.yml --prune
142-
conda activate gluon_vision_docs
140+
conda env create -n gluon_cv_docs -f docs/build.yml
141+
conda env update -n gluon_cv_docs -f docs/build.yml --prune
142+
conda activate gluon_cv_docs
143143
export PYTHONPATH=\${PWD}
144144
export CUDA_VISIBLE_DEVICES=${VISIBLE_GPU}
145145
env

gluoncv/model_zoo/rcnn/faster_rcnn/faster_rcnn.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ def target_generator(self):
223223
raise ValueError("`minimal_opset` enabled, target generator is not available")
224224
if not isinstance(self._target_generator, mx.gluon.Block):
225225
self._target_generator = self._target_generator()
226+
self._target_generator.initialize()
226227
return self._target_generator
227228

228229
def reset_class(self, classes, reuse_weights=None):

tests/py3_mxnet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ dependencies:
2323
- opencv-python
2424
- git+https://github.com/zhanghang1989/detail-api.git#subdirectory=PythonAPI
2525
- portalocker
26-
- autocfg
26+
- autocfg

tests/py3_mxnet_ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: gluon_cv_py3_mxnet
2+
channels:
3+
- conda-forge
4+
- defaults
5+
dependencies:
6+
- python=3.6
7+
- perl
8+
- sphinx=1.7.2
9+
- nose
10+
- coverage=4.5.4
11+
- scipy
12+
- cython
13+
- pip=20.2.4
14+
- requests
15+
- matplotlib
16+
- tqdm
17+
- pillow
18+
- pip:
19+
- mxnet
20+
- coverage-badge
21+
- awscli
22+
- nose-timer
23+
- opencv-python
24+
- git+https://github.com/zhanghang1989/detail-api.git#subdirectory=PythonAPI
25+
- portalocker
26+
- autocfg
27+
- boto3

tools/batch/docker/Dockerfile.gpu

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2020
python3-pip \
2121
python3-setuptools \
2222
pandoc \
23+
libgl1-mesa-glx \
2324
libxft-dev &&\
2425
rm -rf /var/lib/apt/lists/*
2526

@@ -28,7 +29,11 @@ RUN pip3 install --no-cache --upgrade \
2829
wheel \
2930
cmake \
3031
awscli \
31-
pypandoc
32+
pypandoc \
33+
nose \
34+
nose-timer \
35+
torch \
36+
torchvision
3237
RUN git clone https://github.com/dmlc/gluon-cv
3338
WORKDIR gluon-cv
3439
ADD gluon_cv_job.sh .

tools/batch/docker/docker_deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if [ $TYPE == cpu ] || [ $TYPE == CPU ]; then
1414
elif [ $TYPE == gpu ] || [ $TYPE == GPU ]; then
1515
docker build -f Dockerfile.gpu -t gluon-cv-1:latest .
1616
docker tag gluon-cv-1:latest $AWS_ECR_REPO:latest
17-
docker push $AWS_ECR_REPO1:latest
17+
docker push $AWS_ECR_REPO:latest
1818
else
1919
echo "Invalid type detected. Choices: cpu, gpu"
2020
exit 1

0 commit comments

Comments
 (0)