File: prototype-tests-linux-gpu.yml

package info (click to toggle)
pytorch-vision 0.24.1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 21,844 kB
  • sloc: python: 70,433; cpp: 11,502; ansic: 2,588; java: 550; sh: 317; xml: 79; objc: 56; makefile: 33
file content (59 lines) | stat: -rw-r--r-- 1,978 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Prototype tests on Linux

# IMPORTANT: This workflow has been manually disabled from the GitHub interface
# in June 2024. The file is kept for reference in case we ever put this back.

on:
  pull_request:

jobs:
  unittests-prototype:
    strategy:
      matrix:
        python-version:
          - "3.10"
          - "3.11"
          - "3.12"
        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.6"
      fail-fast: false
    uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@release/2.9
    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
      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

        # Prepare conda
        CONDA_PATH=$(which conda)
        eval "$(${CONDA_PATH} shell.bash hook)"
        conda activate ci

        echo '::group::Install testing utilities'
        pip install --progress-bar=off pytest pytest-mock pytest-cov
        echo '::endgroup::'

        # We don't want to run the prototype datasets tests. Since the positional glob into `pytest`, i.e.
        # `test/test_prototype*.py` takes the highest priority, neither `--ignore` nor `--ignore-glob` can help us here.
        rm test/test_prototype_datasets*.py
        pytest \
          -v --durations=25 \
          --cov=torchvision/prototype --cov-report=term-missing \
          --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" \
          test/test_prototype_*.py