Skip to content

Commit 167bc57

Browse files
authored
Merge branch 'main' into 313
2 parents bfdb356 + 8ea4772 commit 167bc57

File tree

96 files changed

+1649
-1259
lines changed

Some content is hidden

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

96 files changed

+1649
-1259
lines changed

.github/scripts/setup-env.sh

+12-5
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,7 @@ echo '::endgroup::'
4545

4646
if [[ "${OS_TYPE}" == windows && "${GPU_ARCH_TYPE}" == cuda ]]; then
4747
echo '::group::Install VisualStudio CUDA extensions on Windows'
48-
if [[ "${VC_YEAR:-}" == "2022" ]]; then
49-
TARGET_DIR="/c/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Microsoft/VC/v170/BuildCustomizations"
50-
else
51-
TARGET_DIR="/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/MSBuild/Microsoft/VC/v160/BuildCustomizations"
52-
fi
48+
TARGET_DIR="/c/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Microsoft/VC/v170/BuildCustomizations"
5349
mkdir -p "${TARGET_DIR}"
5450
cp -r "${CUDA_HOME}/MSBuildExtensions/"* "${TARGET_DIR}"
5551
echo '::endgroup::'
@@ -102,6 +98,17 @@ echo '::group::Install TorchVision'
10298
python setup.py develop
10399
echo '::endgroup::'
104100

101+
echo '::group::Install torchvision-extra-decoders'
102+
# This can be done after torchvision was built
103+
if [[ "$(uname)" == "Linux" && "$(uname -m)" != "aarch64" ]]; then
104+
extra_decoders_channel="--pre --index-url https://download.pytorch.org/whl/nightly/cpu"
105+
else
106+
extra_decoders_channel=""
107+
fi
108+
109+
pip install torchvision-extra-decoders $extra_decoders_channel
110+
echo '::endgroup::'
111+
105112
echo '::group::Collect environment information'
106113
conda list
107114
python -m torch.utils.collect_env

.github/scripts/unittest.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ echo '::endgroup::'
1515
python test/smoke_test.py
1616

1717
# We explicitly ignore the video tests until we resolve https://github.com/pytorch/vision/issues/8162
18-
pytest --ignore-glob="*test_video*" --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25
18+
pytest --ignore-glob="*test_video*" --ignore-glob="*test_onnx*" --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 -k "not TestFxFeatureExtraction"

.github/workflows/build-cmake.yml

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ jobs:
2121
gpu-arch-version: "11.8"
2222
fail-fast: false
2323
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
24+
permissions:
25+
id-token: write
26+
contents: read
2427
with:
2528
repository: pytorch/vision
2629
runner: ${{ matrix.runner }}

.github/workflows/build-conda-linux.yml

-52
This file was deleted.

.github/workflows/build-conda-m1.yml

-54
This file was deleted.

.github/workflows/build-conda-windows.yml

-53
This file was deleted.

.github/workflows/docs.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
jobs:
1616
build:
1717
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
18+
permissions:
19+
id-token: write
20+
contents: read
1821
with:
1922
repository: pytorch/vision
2023
upload-artifact: docs
@@ -79,9 +82,10 @@ jobs:
7982
needs: build
8083
if: github.repository == 'pytorch/vision' && github.event_name == 'push' &&
8184
((github.ref_type == 'branch' && github.ref_name == 'main') || github.ref_type == 'tag')
85+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
8286
permissions:
87+
id-token: write
8388
contents: write
84-
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
8589
with:
8690
repository: pytorch/vision
8791
download-artifact: docs

.github/workflows/lint.yml

+9
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
jobs:
1313
python-source-and-configs:
1414
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
15+
permissions:
16+
id-token: write
17+
contents: read
1518
with:
1619
repository: pytorch/vision
1720
test-infra-ref: main
@@ -39,6 +42,9 @@ jobs:
3942
4043
c-source:
4144
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
45+
permissions:
46+
id-token: write
47+
contents: read
4248
with:
4349
repository: pytorch/vision
4450
test-infra-ref: main
@@ -66,6 +72,9 @@ jobs:
6672
6773
python-types:
6874
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
75+
permissions:
76+
id-token: write
77+
contents: read
6978
with:
7079
repository: pytorch/vision
7180
test-infra-ref: main

.github/workflows/prototype-tests-linux-gpu.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ jobs:
2323
gpu-arch-type: cuda
2424
gpu-arch-version: "11.8"
2525
fail-fast: false
26-
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
26+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
27+
permissions:
28+
id-token: write
29+
contents: read
2730
with:
2831
repository: pytorch/vision
2932
runner: ${{ matrix.runner }}

.github/workflows/tests.yml

+47-33
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ jobs:
2727
gpu-arch-type: cuda
2828
gpu-arch-version: "11.8"
2929
fail-fast: false
30-
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
30+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
31+
permissions:
32+
id-token: write
33+
contents: read
3134
with:
3235
repository: pytorch/vision
3336
runner: ${{ matrix.runner }}
@@ -50,7 +53,8 @@ jobs:
5053
python-version:
5154
- "3.9"
5255
- "3.10"
53-
- "3.11"
56+
# TODO put back 3.11 (See blame)
57+
# - "3.11"
5458
- "3.12"
5559
- "3.13"
5660
runner: ["macos-m1-stable"]
@@ -81,13 +85,17 @@ jobs:
8185
- "3.13"
8286
runner: ["windows.4xlarge"]
8387
gpu-arch-type: ["cpu"]
84-
include:
85-
- python-version: "3.9"
86-
runner: windows.g5.4xlarge.nvidia.gpu
87-
gpu-arch-type: cuda
88-
gpu-arch-version: "11.8"
88+
# TODO: put GPU testing back
89+
# include:
90+
# - python-version: "3.9"
91+
# runner: windows.g5.4xlarge.nvidia.gpu
92+
# gpu-arch-type: cuda
93+
# gpu-arch-version: "11.8"
8994
fail-fast: false
9095
uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
96+
permissions:
97+
id-token: write
98+
contents: read
9199
with:
92100
repository: pytorch/vision
93101
runner: ${{ matrix.runner }}
@@ -99,46 +107,52 @@ jobs:
99107
set -euxo pipefail
100108
101109
export PYTHON_VERSION=${{ matrix.python-version }}
102-
export VC_YEAR=2019
110+
export VC_YEAR=2022
103111
export VSDEVCMD_ARGS=""
104112
export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}
105113
export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
106114
107115
./.github/scripts/unittest.sh
108116
109-
onnx:
110-
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
111-
with:
112-
repository: pytorch/vision
113-
test-infra-ref: main
114-
script: |
115-
set -euo pipefail
117+
# onnx:
118+
# uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
119+
# permissions:
120+
# id-token: write
121+
# contents: read
122+
# with:
123+
# repository: pytorch/vision
124+
# test-infra-ref: main
125+
# script: |
126+
# set -euo pipefail
116127

117-
export PYTHON_VERSION=3.10
118-
export GPU_ARCH_TYPE=cpu
119-
export GPU_ARCH_VERSION=''
128+
# export PYTHON_VERSION=3.10
129+
# export GPU_ARCH_TYPE=cpu
130+
# export GPU_ARCH_VERSION=''
120131

121-
./.github/scripts/setup-env.sh
132+
# ./.github/scripts/setup-env.sh
122133

123-
# Prepare conda
124-
CONDA_PATH=$(which conda)
125-
eval "$(${CONDA_PATH} shell.bash hook)"
126-
conda activate ci
134+
# # Prepare conda
135+
# CONDA_PATH=$(which conda)
136+
# eval "$(${CONDA_PATH} shell.bash hook)"
137+
# conda activate ci
127138

128-
echo '::group::Install ONNX'
129-
pip install --progress-bar=off onnx onnxruntime
130-
echo '::endgroup::'
139+
# echo '::group::Install ONNX'
140+
# pip install --progress-bar=off onnx onnxruntime
141+
# echo '::endgroup::'
131142

132-
echo '::group::Install testing utilities'
133-
pip install --progress-bar=off pytest "numpy<2"
134-
echo '::endgroup::'
143+
# echo '::group::Install testing utilities'
144+
# pip install --progress-bar=off pytest "numpy<2"
145+
# echo '::endgroup::'
135146

136-
echo '::group::Run ONNX tests'
137-
pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 test/test_onnx.py
138-
echo '::endgroup::'
147+
# echo '::group::Run ONNX tests'
148+
# pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 test/test_onnx.py
149+
# echo '::endgroup::'
139150

140151
unittests-extended:
141-
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
152+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
153+
permissions:
154+
id-token: write
155+
contents: read
142156
if: contains(github.event.pull_request.labels.*.name, 'run-extended')
143157
with:
144158
repository: pytorch/vision

0 commit comments

Comments
 (0)