@@ -146,7 +146,7 @@ commands:
146146 default: true
147147 steps:
148148 - pip_install:
149- args: --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
149+ args: --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu
150150 descr: Install PyTorch from nightly releases
151151 - pip_install:
152152 args: --no-build-isolation <<# parameters.editable >> --editable <</ parameters.editable >> .
@@ -155,8 +155,11 @@ commands:
155155 install_prototype_dependencies:
156156 steps:
157157 - pip_install:
158- args: iopath git+https://github.com/pytorch/data
159- descr: Install prototype dependencies
158+ args: iopath
159+ descr: Install third-party dependencies
160+ - pip_install:
161+ args: --pre torchdata --extra-index-url https://download.pytorch.org/whl/nightly/cpu
162+ descr: Install torchdata from nightly releases
160163
161164 # Most of the test suite is handled by the `unittest` jobs, with completely different workflow and setup.
162165 # This command can be used if only a selection of tests need to be run, for ad-hoc files.
@@ -174,6 +177,26 @@ commands:
174177 - store_test_results:
175178 path: test-results
176179
180+ download_model_weights:
181+ parameters:
182+ extract_roots:
183+ type: string
184+ default: "torchvision/models"
185+ background:
186+ type: boolean
187+ default: true
188+ steps:
189+ - apt_install:
190+ args: parallel wget
191+ descr: Install download utilitites
192+ - run:
193+ name: Download model weights
194+ background: << parameters.background >>
195+ command: |
196+ mkdir -p ~/.cache/torch/hub/checkpoints
197+ python scripts/collect_model_urls.py << parameters.extract_roots >> \
198+ | parallel -j0 'wget --no-verbose -O ~/.cache/torch/hub/checkpoints/`basename {}` {}\?source=ci'
199+
177200binary_common: &binary_common
178201 parameters:
179202 # Edit these defaults to do a release
@@ -340,25 +363,28 @@ jobs:
340363 resource_class: xlarge
341364 steps:
342365 - checkout
343- - run:
344- name: Download model weights
345- background: true
346- command: |
347- sudo apt update -qy && sudo apt install -qy parallel wget
348- mkdir -p ~/.cache/torch/hub/checkpoints
349- python scripts/collect_model_urls.py torchvision/prototype/models \
350- | parallel -j0 'wget --no-verbose -O ~/.cache/torch/hub/checkpoints/`basename {}` {}\?source=ci'
351366 - install_torchvision
352367 - install_prototype_dependencies
353368 - pip_install:
354369 args: scipy pycocotools h5py
355370 descr: Install optional dependencies
356- - run:
357- name: Enable prototype tests
358- command: echo 'export PYTORCH_TEST_WITH_PROTOTYPE=1' >> $BASH_ENV
359371 - run_tests_selective:
360372 file_or_dir: test/test_prototype_*.py
361373
374+ unittest_extended:
375+ docker:
376+ - image: circleci/python:3.7
377+ resource_class: xlarge
378+ steps:
379+ - checkout
380+ - download_model_weights
381+ - install_torchvision
382+ - run:
383+ name: Enable extended tests
384+ command: echo 'export PYTORCH_TEST_WITH_EXTENDED=1' >> $BASH_ENV
385+ - run_tests_selective:
386+ file_or_dir: test/test_extended_*.py
387+
362388 binary_linux_wheel:
363389 <<: *binary_common
364390 docker:
@@ -1011,12 +1037,13 @@ jobs:
10111037 build_docs:
10121038 <<: *binary_common
10131039 docker:
1014- - image: "pytorch/manylinux-cuda100"
1040+ - image: circleci/python:3.7
10151041 resource_class: 2xlarge+
10161042 steps:
10171043 - attach_workspace:
10181044 at: ~/workspace
10191045 - checkout
1046+ - download_model_weights
10201047 - run:
10211048 name: Setup
10221049 command: .circleci/unittest/linux/scripts/setup_env.sh
@@ -1069,7 +1096,8 @@ jobs:
10691096 # Don't use "checkout" step since it uses ssh, which cannot git push
10701097 # https://circleci.com/docs/2.0/configuration-reference/#checkout
10711098 set -ex
1072- tag=${CIRCLE_TAG:1:5}
1099+ # Change v1.12.1rc1 into 1.12 (only major.minor)
1100+ tag=$(echo $CIRCLE_TAG | sed -e 's/v*\([0-9]*\.[0-9]*\).*/\1/')
10731101 target=${tag:-main}
10741102 ~/workspace/.circleci/build_docs/commit_docs.sh ~/workspace $target
10751103
@@ -1093,6 +1121,7 @@ workflows:
10931121 - unittest_torchhub
10941122 - unittest_onnx
10951123 - unittest_prototype
1124+ - unittest_extended
10961125 {{ unittest_workflows() }}
10971126
10981127 cmake:
0 commit comments