Skip to content

Commit bf3876d

Browse files
committed
Merge branch 'main' of github.com:pytorch/vision into 8317-label-colours
2 parents 81c0cfd + 19fef3d commit bf3876d

File tree

105 files changed

+1357
-527
lines changed

Some content is hidden

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

105 files changed

+1357
-527
lines changed

.github/scripts/cmake.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ else
3030
JOBS=$(nproc)
3131
fi
3232

33+
if [[ $OS_TYPE == linux ]]; then
34+
export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}"
35+
fi
36+
3337
TORCH_PATH=$(python -c "import pathlib, torch; print(pathlib.Path(torch.__path__[0]))")
3438
if [[ $OS_TYPE == windows ]]; then
3539
PACKAGING_DIR="${PWD}/packaging"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
export IS_M1_CONDA_BUILD_JOB=1

.github/scripts/setup-env.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ conda create \
3030
python="${PYTHON_VERSION}" pip \
3131
ninja cmake \
3232
libpng \
33+
libwebp \
3334
'ffmpeg<4.3'
3435
conda activate ci
3536
conda install --quiet --yes libjpeg-turbo -c pytorch
36-
pip install --progress-bar=off --upgrade setuptools
37+
pip install --progress-bar=off --upgrade setuptools==72.1.0
3738

3839
# See https://github.com/pytorch/vision/issues/6790
3940
if [[ "${PYTHON_VERSION}" != "3.11" ]]; then

.github/workflows/build-cmake.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
gpu-arch-type: cuda
2121
gpu-arch-version: "11.8"
2222
fail-fast: false
23-
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
23+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
2424
with:
2525
repository: pytorch/vision
2626
runner: ${{ matrix.runner }}
@@ -30,10 +30,9 @@ jobs:
3030
script: |
3131
set -euo pipefail
3232
33-
export PYTHON_VERSION=3.8
33+
export PYTHON_VERSION=3.9
3434
export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}
3535
export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
36-
3736
./.github/scripts/cmake.sh
3837
3938
macos:
@@ -50,7 +49,7 @@ jobs:
5049
script: |
5150
set -euo pipefail
5251
53-
export PYTHON_VERSION=3.8
52+
export PYTHON_VERSION=3.9
5453
export GPU_ARCH_TYPE=cpu
5554
export GPU_ARCH_VERSION=''
5655
@@ -76,7 +75,7 @@ jobs:
7675
script: |
7776
set -euo pipefail
7877
79-
export PYTHON_VERSION=3.8
78+
export PYTHON_VERSION=3.9
8079
export VC_YEAR=2022
8180
export VSDEVCMD_ARGS=""
8281
export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
test-infra-repository: pytorch/test-infra
4343
test-infra-ref: main
4444
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
45+
env-var-script: ./.github/scripts/export_IS_M1_CONDA_BUILD_JOB.sh
4546
pre-script: ${{ matrix.pre-script }}
4647
post-script: ${{ matrix.post-script }}
4748
package-name: ${{ matrix.package-name }}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ jobs:
2828
matrix:
2929
include:
3030
- repository: pytorch/vision
31-
pre-script: packaging/pre_build_script.sh
32-
env-script: packaging/windows/internal/vc_env_helper.bat
31+
pre-script: ""
3332
post-script: ""
33+
env-script: packaging/windows/internal/vc_env_helper.bat
34+
conda-package-directory: packaging/torchvision
3435
smoke-test-script: test/smoke_test.py
3536
package-name: torchvision
3637
name: ${{ matrix.repository }}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
os: windows
2626
test-infra-repository: pytorch/test-infra
2727
test-infra-ref: main
28+
with-xpu: enable
2829
build:
2930
needs: generate-matrix
3031
strategy:

.github/workflows/docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ on:
1414

1515
jobs:
1616
build:
17-
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
17+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
1818
with:
1919
repository: pytorch/vision
2020
upload-artifact: docs
2121
test-infra-ref: main
2222
script: |
2323
set -euo pipefail
2424
25-
export PYTHON_VERSION=3.8
25+
export PYTHON_VERSION=3.10
2626
export GPU_ARCH_TYPE=cpu
2727
export GPU_ARCH_VERSION=''
2828
./.github/scripts/setup-env.sh
@@ -77,11 +77,11 @@ jobs:
7777
7878
upload:
7979
needs: build
80-
if: github.repository == 'pytorch/vision' && github.event_name == 'push' &&
80+
if: github.repository == 'pytorch/vision' && github.event_name == 'push' &&
8181
((github.ref_type == 'branch' && github.ref_name == 'main') || github.ref_type == 'tag')
8282
permissions:
8383
contents: write
84-
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
84+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
8585
with:
8686
repository: pytorch/vision
8787
download-artifact: docs

.github/workflows/lint.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
python-source-and-configs:
14-
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
14+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
1515
with:
1616
repository: pytorch/vision
1717
test-infra-ref: main
@@ -21,7 +21,7 @@ jobs:
2121
echo '::group::Setup environment'
2222
CONDA_PATH=$(which conda)
2323
eval "$(${CONDA_PATH} shell.bash hook)"
24-
conda create --name ci --quiet --yes python=3.8 pip
24+
conda create --name ci --quiet --yes python=3.9 pip
2525
conda activate ci
2626
echo '::endgroup::'
2727
@@ -38,7 +38,7 @@ jobs:
3838
fi
3939
4040
c-source:
41-
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
41+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
4242
with:
4343
repository: pytorch/vision
4444
test-infra-ref: main
@@ -48,22 +48,14 @@ jobs:
4848
echo '::group::Setup environment'
4949
CONDA_PATH=$(which conda)
5050
eval "$(${CONDA_PATH} shell.bash hook)"
51-
# clang-format needs some shared libraries that conflict with the system ones. Thus, we install them from conda
52-
# and prepend the libraries to linker path to prioritize them. `ncurses=5` is only available on the conda-forge
53-
# channel. Since we are not building or testing here, this is fine.
54-
conda create --name ci --quiet --yes -c conda-forge python=3.8 ncurses=5 libgcc
51+
conda create --name ci --quiet --yes -c conda-forge python=3.9 clang-format
5552
conda activate ci
56-
export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}"
5753
echo '::endgroup::'
5854
59-
echo '::group::Install lint tools'
60-
curl https://oss-clang-format.s3.us-east-2.amazonaws.com/linux64/clang-format-linux64 -o ./clang-format
61-
chmod +x ./clang-format
62-
echo '::endgroup::'
6355
6456
echo '::group::Lint C source'
6557
set +e
66-
./.github/scripts/run-clang-format.py -r torchvision/csrc --clang-format-executable ./clang-format --exclude "torchvision/csrc/io/image/cpu/giflib/*"
58+
./.github/scripts/run-clang-format.py -r torchvision/csrc --exclude "torchvision/csrc/io/image/cpu/giflib/*"
6759
6860
if [ $? -ne 0 ]; then
6961
git --no-pager diff
@@ -73,14 +65,14 @@ jobs:
7365
7466
7567
python-types:
76-
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
68+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
7769
with:
7870
repository: pytorch/vision
7971
test-infra-ref: main
8072
script: |
8173
set -euo pipefail
8274
83-
export PYTHON_VERSION=3.8
75+
export PYTHON_VERSION=3.11
8476
export GPU_ARCH_TYPE=cpu
8577
export GPU_ARCH_VERSION=''
8678
@@ -91,7 +83,7 @@ jobs:
9183
conda activate ci
9284
9385
echo '::group::Install lint tools'
94-
pip install --progress-bar=off mypy
86+
pip install --progress-bar=off "mypy==1.13.0"
9587
echo '::endgroup::'
9688
9789
echo '::group::Lint Python types'

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,19 @@ jobs:
1111
strategy:
1212
matrix:
1313
python-version:
14-
- "3.8"
1514
- "3.9"
1615
- "3.10"
1716
- "3.11"
1817
- "3.12"
1918
runner: ["linux.12xlarge"]
2019
gpu-arch-type: ["cpu"]
2120
include:
22-
- python-version: "3.8"
21+
- python-version: "3.9"
2322
runner: linux.g5.4xlarge.nvidia.gpu
2423
gpu-arch-type: cuda
2524
gpu-arch-version: "11.8"
2625
fail-fast: false
27-
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
26+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
2827
with:
2928
repository: pytorch/vision
3029
runner: ${{ matrix.runner }}
@@ -38,7 +37,7 @@ jobs:
3837
export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}
3938
export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
4039
./.github/scripts/setup-env.sh
41-
40+
4241
# Prepare conda
4342
CONDA_PATH=$(which conda)
4443
eval "$(${CONDA_PATH} shell.bash hook)"

0 commit comments

Comments
 (0)