Skip to content

Commit d9e1f4b

Browse files
author
pytorchbot
committed
2025-03-18 nightly release (8d68f9c)
1 parent 96a6555 commit d9e1f4b

File tree

8 files changed

+81
-51
lines changed

8 files changed

+81
-51
lines changed

.github/scripts/setup-env.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,13 @@ echo '::endgroup::'
100100

101101
echo '::group::Install torchvision-extra-decoders'
102102
# This can be done after torchvision was built
103-
pip install torchvision-extra-decoders
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
104110
echo '::endgroup::'
105111

106112
echo '::group::Collect environment information'

.github/scripts/unittest.sh

Lines changed: 1 addition & 1 deletion
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/tests.yml

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ jobs:
5252
python-version:
5353
- "3.9"
5454
- "3.10"
55-
- "3.11"
55+
# TODO put back 3.11 (See blame)
56+
# - "3.11"
5657
- "3.12"
5758
runner: ["macos-m1-stable"]
5859
fail-fast: false
@@ -81,11 +82,12 @@ jobs:
8182
- "3.12"
8283
runner: ["windows.4xlarge"]
8384
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"
85+
# TODO: put GPU testing back
86+
# include:
87+
# - python-version: "3.9"
88+
# runner: windows.g5.4xlarge.nvidia.gpu
89+
# gpu-arch-type: cuda
90+
# gpu-arch-version: "11.8"
8991
fail-fast: false
9092
uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
9193
permissions:
@@ -109,39 +111,39 @@ jobs:
109111
110112
./.github/scripts/unittest.sh
111113
112-
onnx:
113-
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
114-
permissions:
115-
id-token: write
116-
contents: read
117-
with:
118-
repository: pytorch/vision
119-
test-infra-ref: main
120-
script: |
121-
set -euo pipefail
122-
123-
export PYTHON_VERSION=3.10
124-
export GPU_ARCH_TYPE=cpu
125-
export GPU_ARCH_VERSION=''
126-
127-
./.github/scripts/setup-env.sh
128-
129-
# Prepare conda
130-
CONDA_PATH=$(which conda)
131-
eval "$(${CONDA_PATH} shell.bash hook)"
132-
conda activate ci
133-
134-
echo '::group::Install ONNX'
135-
pip install --progress-bar=off onnx onnxruntime
136-
echo '::endgroup::'
137-
138-
echo '::group::Install testing utilities'
139-
pip install --progress-bar=off pytest "numpy<2"
140-
echo '::endgroup::'
141-
142-
echo '::group::Run ONNX tests'
143-
pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 test/test_onnx.py
144-
echo '::endgroup::'
114+
# onnx:
115+
# uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
116+
# permissions:
117+
# id-token: write
118+
# contents: read
119+
# with:
120+
# repository: pytorch/vision
121+
# test-infra-ref: main
122+
# script: |
123+
# set -euo pipefail
124+
125+
# export PYTHON_VERSION=3.10
126+
# export GPU_ARCH_TYPE=cpu
127+
# export GPU_ARCH_VERSION=''
128+
129+
# ./.github/scripts/setup-env.sh
130+
131+
# # Prepare conda
132+
# CONDA_PATH=$(which conda)
133+
# eval "$(${CONDA_PATH} shell.bash hook)"
134+
# conda activate ci
135+
136+
# echo '::group::Install ONNX'
137+
# pip install --progress-bar=off onnx onnxruntime
138+
# echo '::endgroup::'
139+
140+
# echo '::group::Install testing utilities'
141+
# pip install --progress-bar=off pytest "numpy<2"
142+
# echo '::endgroup::'
143+
144+
# echo '::group::Run ONNX tests'
145+
# pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 test/test_onnx.py
146+
# echo '::endgroup::'
145147

146148
unittests-extended:
147149
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main

packaging/post_build_script.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
#!/bin/bash
2-
LD_LIBRARY_PATH="/usr/local/lib:$CUDA_HOME/lib64:$LD_LIBRARY_PATH" python packaging/wheel/relocate.py
2+
set -euxo pipefail
33

4-
pip install torchvision-extra-decoders
4+
if [ -n "${CUDA_HOME:-}" ]; then
5+
LD_LIBRARY_PATH="/usr/local/lib:${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}"
6+
fi
7+
8+
python packaging/wheel/relocate.py
9+
10+
if [[ "$(uname)" == "Linux" && "$(uname -m)" != "aarch64" ]]; then
11+
extra_decoders_channel="--pre --index-url https://download.pytorch.org/whl/nightly/cpu"
12+
else
13+
extra_decoders_channel=""
14+
fi
15+
16+
pip install torchvision-extra-decoders $extra_decoders_channel

packaging/pre_build_script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ else
3636
conda install libwebp -y
3737
conda install libjpeg-turbo -c pytorch
3838
yum install -y freetype gnutls
39-
pip install auditwheel
39+
pip install "auditwheel<6.3.0"
4040
fi
4141

4242
pip install numpy pyyaml future ninja

packaging/wheel/relocate.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515

1616
# Third party imports
1717
if sys.platform == "linux":
18-
from auditwheel.lddtree import lddtree
18+
try:
19+
from auditwheel.lddtree import lddtree
20+
except ImportError:
21+
from auditwheel import lddtree
1922

2023

2124
ALLOWLIST = {

test/test_image.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -897,12 +897,16 @@ def test_decode_gif(tmpdir, name, scripted):
897897
(decode_gif, re.escape("DGifOpenFileName() failed - 103")),
898898
(decode_webp, "WebPGetFeatures failed."),
899899
pytest.param(
900-
decode_avif, "BMFF parsing failed", marks=pytest.mark.skipif(not IS_LINUX, reason=HEIC_AVIF_MESSAGE)
900+
decode_avif,
901+
"BMFF parsing failed",
902+
# marks=pytest.mark.skipif(not IS_LINUX, reason=HEIC_AVIF_MESSAGE)
903+
marks=pytest.mark.skipif(True, reason="Skipping avif/heic tests for now."),
901904
),
902905
pytest.param(
903906
decode_heic,
904907
"Invalid input: No 'ftyp' box",
905-
marks=pytest.mark.skipif(not IS_LINUX, reason=HEIC_AVIF_MESSAGE),
908+
# marks=pytest.mark.skipif(not IS_LINUX, reason=HEIC_AVIF_MESSAGE),
909+
marks=pytest.mark.skipif(True, reason="Skipping avif/heic tests for now."),
906910
),
907911
],
908912
)
@@ -961,7 +965,8 @@ def test_decode_webp_against_pil(decode_fun, scripted, mode, pil_mode, filename)
961965
img += 123 # make sure image buffer wasn't freed by underlying decoding lib
962966

963967

964-
@pytest.mark.skipif(not IS_LINUX, reason=HEIC_AVIF_MESSAGE)
968+
# @pytest.mark.skipif(not IS_LINUX, reason=HEIC_AVIF_MESSAGE)
969+
@pytest.mark.skipif(True, reason="Skipping avif/heic tests for now.")
965970
@pytest.mark.parametrize("decode_fun", (decode_avif,))
966971
def test_decode_avif(decode_fun):
967972
encoded_bytes = read_file(next(get_images(FAKEDATA_DIR, ".avif")))
@@ -973,7 +978,8 @@ def test_decode_avif(decode_fun):
973978

974979
# Note: decode_image fails because some of these files have a (valid) signature
975980
# we don't recognize. We should probably use libmagic....
976-
@pytest.mark.skipif(not IS_LINUX, reason=HEIC_AVIF_MESSAGE)
981+
# @pytest.mark.skipif(not IS_LINUX, reason=HEIC_AVIF_MESSAGE)
982+
@pytest.mark.skipif(True, reason="Skipping avif/heic tests for now.")
977983
@pytest.mark.parametrize("decode_fun", (decode_avif, decode_heic))
978984
@pytest.mark.parametrize(
979985
"mode, pil_mode",
@@ -1050,7 +1056,8 @@ def test_decode_avif_heic_against_pil(decode_fun, mode, pil_mode, filename):
10501056
torch.testing.assert_close(img, from_pil, rtol=0, atol=3)
10511057

10521058

1053-
@pytest.mark.skipif(not IS_LINUX, reason=HEIC_AVIF_MESSAGE)
1059+
# @pytest.mark.skipif(not IS_LINUX, reason=HEIC_AVIF_MESSAGE)
1060+
@pytest.mark.skipif(True, reason="Skipping avif/heic tests for now.")
10541061
@pytest.mark.parametrize("decode_fun", (decode_heic,))
10551062
def test_decode_heic(decode_fun):
10561063
encoded_bytes = read_file(next(get_images(FAKEDATA_DIR, ".heic")))

torchvision/transforms/v2/_geometry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ class RandomRotation(Transform):
567567
Args:
568568
degrees (sequence or number): Range of degrees to select from.
569569
If degrees is a number instead of sequence like (min, max), the range of degrees
570-
will be (-degrees, +degrees).
570+
will be [-degrees, +degrees].
571571
interpolation (InterpolationMode, optional): Desired interpolation enum defined by
572572
:class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.NEAREST``.
573573
If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported.

0 commit comments

Comments
 (0)