Skip to content

Commit af3cbe6

Browse files
authored
Merge branch 'main' into gdrive-virus-scan
2 parents 7fe6562 + d59398b commit af3cbe6

File tree

186 files changed

+5919
-7613
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+5919
-7613
lines changed

.circleci/config.yml

Lines changed: 32 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.circleci/config.yml.in

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -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.
@@ -263,7 +266,7 @@ smoke_test_common: &smoke_test_common
263266
jobs:
264267
circleci_consistency:
265268
docker:
266-
- image: circleci/python:3.7
269+
- image: cimg/python:3.7
267270
steps:
268271
- checkout
269272
- pip_install:
@@ -276,7 +279,7 @@ jobs:
276279

277280
lint_python_and_config:
278281
docker:
279-
- image: circleci/python:3.7
282+
- image: cimg/python:3.7
280283
steps:
281284
- checkout
282285
- pip_install:
@@ -295,7 +298,7 @@ jobs:
295298

296299
lint_c:
297300
docker:
298-
- image: circleci/python:3.7
301+
- image: cimg/python:3.7
299302
steps:
300303
- apt_install:
301304
args: libtinfo5
@@ -317,7 +320,7 @@ jobs:
317320

318321
type_check_python:
319322
docker:
320-
- image: circleci/python:3.7
323+
- image: cimg/python:3.7
321324
steps:
322325
- apt_install:
323326
args: libturbojpeg-dev
@@ -335,7 +338,7 @@ jobs:
335338

336339
unittest_torchhub:
337340
docker:
338-
- image: circleci/python:3.7
341+
- image: cimg/python:3.7
339342
steps:
340343
- checkout
341344
- install_torchvision
@@ -344,7 +347,7 @@ jobs:
344347

345348
unittest_onnx:
346349
docker:
347-
- image: circleci/python:3.7
350+
- image: cimg/python:3.7
348351
steps:
349352
- checkout
350353
- install_torchvision
@@ -356,23 +359,32 @@ jobs:
356359

357360
unittest_prototype:
358361
docker:
359-
- image: circleci/python:3.7
362+
- image: cimg/python:3.7
360363
resource_class: xlarge
361364
steps:
362365
- checkout
363-
- download_model_weights:
364-
extract_roots: torchvision/prototype/models
365366
- install_torchvision
366367
- install_prototype_dependencies
367368
- pip_install:
368369
args: scipy pycocotools h5py
369370
descr: Install optional dependencies
370-
- run:
371-
name: Enable prototype tests
372-
command: echo 'export PYTORCH_TEST_WITH_PROTOTYPE=1' >> $BASH_ENV
373371
- run_tests_selective:
374372
file_or_dir: test/test_prototype_*.py
375373

374+
unittest_extended:
375+
docker:
376+
- image: cimg/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+
376388
binary_linux_wheel:
377389
<<: *binary_common
378390
docker:
@@ -523,7 +535,7 @@ jobs:
523535
binary_android_build:
524536
<<: *torchvision_android_params
525537
docker:
526-
- image: circleci/android:api-29-ndk
538+
- image: cimg/android:2021.08-ndk
527539
resource_class: xlarge
528540
steps:
529541
- attach_workspace:
@@ -542,7 +554,7 @@ jobs:
542554
binary_android_upload:
543555
<<: *torchvision_android_params
544556
docker:
545-
- image: circleci/android:api-29-ndk
557+
- image: cimg/android:2021.08-ndk
546558
resource_class: xlarge
547559
steps:
548560
- attach_workspace:
@@ -601,7 +613,7 @@ jobs:
601613
description: "What whl subfolder to upload to, e.g., blank or cu100/ (trailing slash is important)"
602614
type: string
603615
docker:
604-
- image: circleci/python:3.7
616+
- image: cimg/python:3.7
605617
steps:
606618
- attach_workspace:
607619
at: ~/workspace
@@ -1025,7 +1037,7 @@ jobs:
10251037
build_docs:
10261038
<<: *binary_common
10271039
docker:
1028-
- image: circleci/python:3.7
1040+
- image: cimg/python:3.7
10291041
resource_class: 2xlarge+
10301042
steps:
10311043
- attach_workspace:
@@ -1109,6 +1121,7 @@ workflows:
11091121
- unittest_torchhub
11101122
- unittest_onnx
11111123
- unittest_prototype
1124+
- unittest_extended
11121125
{{ unittest_workflows() }}
11131126

11141127
cmake:

.circleci/unittest/linux/scripts/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ else
2121
fi
2222
echo "Using CUDA $CUDA_VERSION as determined by CU_VERSION"
2323
version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")"
24-
cudatoolkit="cudatoolkit=${version}"
24+
cudatoolkit="nvidia::cudatoolkit=${version}"
2525
fi
2626

2727
case "$(uname -s)" in
@@ -33,7 +33,7 @@ printf "Installing PyTorch with %s\n" "${cudatoolkit}"
3333
if [ "${os}" == "MacOSX" ]; then
3434
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" "pytorch-${UPLOAD_CHANNEL}"::pytorch "${cudatoolkit}" pytest
3535
else
36-
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" "pytorch-${UPLOAD_CHANNEL}"::pytorch[build="*${version}*"] "${cudatoolkit}" pytest
36+
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" -c nvidia "pytorch-${UPLOAD_CHANNEL}"::pytorch[build="*${version}*"] "${cudatoolkit}" pytest
3737
fi
3838

3939
printf "* Installing torchvision\n"

.git-blame-ignore-revs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file keeps git blame clean.
2+
# See https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view
3+
4+
# Add ufmt (usort + black) as code formatter (#4384)
5+
5f0edb97b46e5bff71dc19dedef05c5396eeaea2
6+
# update python syntax >=3.6 (#4585)
7+
d367a01a18a3ae6bee13d8be3b63fd6a581ea46f

android/test_app/make_assets.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
import torch
2-
import torchvision
32
from torch.utils.mobile_optimizer import optimize_for_mobile
3+
from torchvision.models.detection import (
4+
fasterrcnn_mobilenet_v3_large_320_fpn,
5+
FasterRCNN_MobileNet_V3_Large_320_FPN_Weights,
6+
)
47

58
print(torch.__version__)
69

7-
model = torchvision.models.detection.fasterrcnn_mobilenet_v3_large_320_fpn(
8-
pretrained=True, box_score_thresh=0.7, rpn_post_nms_top_n_test=100, rpn_score_thresh=0.4, rpn_pre_nms_top_n_test=150
10+
model = fasterrcnn_mobilenet_v3_large_320_fpn(
11+
weights=FasterRCNN_MobileNet_V3_Large_320_FPN_Weights.DEFAULT,
12+
box_score_thresh=0.7,
13+
rpn_post_nms_top_n_test=100,
14+
rpn_score_thresh=0.4,
15+
rpn_pre_nms_top_n_test=150,
916
)
1017

1118
model.eval()

docs/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ numpy
33
sphinx-copybutton>=0.3.1
44
sphinx-gallery>=0.9.0
55
sphinx==3.5.4
6+
# This pin is only needed for sphinx<4.0.2. See https://github.com/pytorch/vision/issues/5673 for details
7+
Jinja2<3.1.*
68
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme

0 commit comments

Comments
 (0)