2026-08-01 nightly release (10f68dbd78b9aa5cab9328f3b2e99cfb0b608122) #6538
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - nightly | |
| - main | |
| - release/* | |
| workflow_dispatch: | |
| jobs: | |
| unittests-linux: | |
| strategy: | |
| matrix: | |
| python-version: | |
| - "3.10" | |
| - "3.14" | |
| runner: ["linux.12xlarge"] | |
| gpu-arch-type: ["cpu"] | |
| include: | |
| - python-version: "3.10" | |
| runner: linux.g5.4xlarge.nvidia.gpu | |
| gpu-arch-type: cuda | |
| gpu-arch-version: "12.8" | |
| fail-fast: false | |
| uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main | |
| permissions: | |
| id-token: write | |
| contents: read | |
| with: | |
| repository: pytorch/vision | |
| runner: ${{ matrix.runner }} | |
| gpu-arch-type: ${{ matrix.gpu-arch-type }} | |
| gpu-arch-version: ${{ matrix.gpu-arch-version }} | |
| timeout: 120 | |
| test-infra-ref: main | |
| script: | | |
| set -euo pipefail | |
| export PYTHON_VERSION=${{ matrix.python-version }} | |
| export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }} | |
| export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }} | |
| ./.github/scripts/unittest.sh | |
| unittests-rocm: | |
| # ROCm runners are not on EC2 and authenticate to AWS (ECR) via GitHub OIDC. | |
| # Fork PRs don't get an OIDC id-token from GitHub, so the job can't pull the | |
| # docker image and always fails. Skip it for fork PRs; it still runs on | |
| # same-repo PRs, push, and workflow_dispatch. | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | |
| strategy: | |
| matrix: | |
| python-version: | |
| - "3.10" | |
| runner: ["linux.rocm.gpu.gfx942.1"] | |
| gpu-arch-type: ["rocm"] | |
| gpu-arch-version: ["7.1"] | |
| fail-fast: false | |
| uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main | |
| permissions: | |
| id-token: write | |
| contents: read | |
| with: | |
| repository: pytorch/vision | |
| runner: ${{ matrix.runner }} | |
| gpu-arch-type: ${{ matrix.gpu-arch-type }} | |
| gpu-arch-version: ${{ matrix.gpu-arch-version }} | |
| # ROCm self-hosted runners are not on EC2, so they can't pull the default | |
| # ECR-hosted docker image (no AWS credentials). Use a Docker Hub image and | |
| # run without sudo, matching pytorch/ao and pytorch/kineto ROCm jobs. | |
| docker-image: pytorch/manylinux2_28-builder:rocm7.1 | |
| no-sudo: true | |
| timeout: 120 | |
| test-infra-ref: main | |
| script: | | |
| set -euo pipefail | |
| export PYTHON_VERSION=${{ matrix.python-version }} | |
| export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }} | |
| export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }} | |
| ./.github/scripts/setup-env.sh | |
| eval "$($(which conda) shell.bash hook)" && conda deactivate && conda activate ci | |
| echo '::group::Install testing utilities' | |
| pip install --progress-bar=off "pytest<8" pytest-mock pytest-cov expecttest!=0.2.0 requests | |
| echo '::endgroup::' | |
| echo '::group::Run image tests' | |
| pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 test/test_image.py | |
| echo '::endgroup::' | |
| unittests-macos: | |
| strategy: | |
| matrix: | |
| python-version: | |
| - "3.10" | |
| - "3.14" | |
| runner: ["macos-m1-stable"] | |
| fail-fast: false | |
| uses: pytorch/test-infra/.github/workflows/macos_job.yml@main | |
| with: | |
| repository: pytorch/vision | |
| timeout: 240 | |
| runner: ${{ matrix.runner }} | |
| test-infra-ref: main | |
| script: | | |
| set -euo pipefail | |
| export PYTHON_VERSION=${{ matrix.python-version }} | |
| export GPU_ARCH_TYPE=cpu | |
| export GPU_ARCH_VERSION='' | |
| ${CONDA_RUN} ./.github/scripts/unittest.sh | |
| unittests-windows: | |
| strategy: | |
| matrix: | |
| python-version: | |
| # - "3.10" # Fails with annoying SSL issue. Whatever. | |
| - "3.14" | |
| runner: ["windows.4xlarge"] | |
| gpu-arch-type: ["cpu"] | |
| # TODO: put GPU testing back | |
| # include: | |
| # - python-version: "3.10" | |
| # runner: windows.g5.4xlarge.nvidia.gpu | |
| # gpu-arch-type: cuda | |
| # gpu-arch-version: "12.8" | |
| fail-fast: false | |
| uses: pytorch/test-infra/.github/workflows/windows_job.yml@main | |
| permissions: | |
| id-token: write | |
| contents: read | |
| with: | |
| repository: pytorch/vision | |
| runner: ${{ matrix.runner }} | |
| gpu-arch-type: ${{ matrix.gpu-arch-type }} | |
| gpu-arch-version: ${{ matrix.gpu-arch-version }} | |
| timeout: 120 | |
| test-infra-ref: main | |
| script: | | |
| set -euxo pipefail | |
| export PYTHON_VERSION=${{ matrix.python-version }} | |
| export VC_YEAR=2022 | |
| export VSDEVCMD_ARGS="" | |
| export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }} | |
| export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }} | |
| ./.github/scripts/unittest.sh | |
| unittests-extended: | |
| uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main | |
| permissions: | |
| id-token: write | |
| contents: read | |
| if: contains(github.event.pull_request.labels.*.name, 'run-extended') | |
| with: | |
| repository: pytorch/vision | |
| test-infra-ref: main | |
| script: | | |
| set -euo pipefail | |
| export PYTHON_VERSION="3.10" | |
| export GPU_ARCH_TYPE=cpu | |
| export GPU_ARCH_VERSION='' | |
| ./.github/scripts/setup-env.sh | |
| # Prepare conda | |
| CONDA_PATH=$(which conda) | |
| eval "$(${CONDA_PATH} shell.bash hook)" | |
| conda activate ci | |
| echo '::group::Pre-download model weights' | |
| pip install --progress-bar=off aiohttp aiofiles tqdm | |
| python scripts/download_model_urls.py | |
| echo '::endgroup::' | |
| echo '::group::Install testing utilities' | |
| # TODO: remove the <8 constraint on pytest when https://github.com/pytorch/vision/issues/8238 is closed | |
| pip install --progress-bar=off "pytest<8" | |
| echo '::endgroup::' | |
| echo '::group::Run extended unittests' | |
| export PYTORCH_TEST_WITH_EXTENDED=1 | |
| pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 test/test_extended_*.py | |
| echo '::endgroup::' |