remove old timm models from benchmark (#164805) #1332
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: TorchBench PR Test | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - config: cpu | |
| runner: linux.24xlarge | |
| - config: cuda | |
| runner: linux.aws.a100 | |
| name: Test ${{ matrix.config }} | |
| env: | |
| DOCKER_IMAGE: 'ghcr.io/pytorch/torchbench:latest' | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 240 | |
| environment: docker-s3-upload | |
| steps: | |
| - name: Checkout TorchBench | |
| uses: actions/checkout@v5 | |
| - name: Pull docker image | |
| uses: pytorch/test-infra/.github/actions/pull-docker-image@main | |
| with: | |
| docker-image: ${{ env.DOCKER_IMAGE }} | |
| - name: Setup CUDA GPU_FLAG for docker run | |
| if: matrix.config == 'cuda' | |
| run: | | |
| echo "GPU_FLAG=--gpus all -e NVIDIA_DRIVER_CAPABILITIES=all" >> "${GITHUB_ENV}" | |
| - name: Test TorchBench | |
| shell: bash | |
| env: | |
| HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} | |
| TEST_CONFIG: ${{ matrix.config }} | |
| run: | | |
| set -eux | |
| container_name=$(docker run \ | |
| ${GPU_FLAG:-} \ | |
| -e HUGGING_FACE_HUB_TOKEN \ | |
| -e TEST_CONFIG \ | |
| --ipc=host \ | |
| --tty \ | |
| --detach \ | |
| --security-opt seccomp=unconfined \ | |
| --shm-size=32g \ | |
| --cap-add=SYS_PTRACE \ | |
| -v "${GITHUB_WORKSPACE}:/tmp/workspace" \ | |
| -w /tmp/workspace \ | |
| "${DOCKER_IMAGE}" | |
| ) | |
| # Install TorchBench | |
| docker exec -t -w /tmp/workspace "${container_name}" bash -c " | |
| set -eux | |
| bash .ci/torchbench/install.sh | |
| " | |
| # Run TorchBench tests | |
| docker exec -t -w /tmp/workspace "${container_name}" bash -c " | |
| set -eux | |
| bash .ci/torchbench/test.sh | |
| " | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }} | |
| cancel-in-progress: true |