Merge upstream/main, keeping upstream code with Apache-2.0 headers #92
Workflow file for this run
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
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |
| # SPDX-License-Identifier: Apache-2.0 | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| # GPU tests live in a separate workflow because NVIDIA self-hosted runners | |
| # block pull_request events entirely. Keeping them here avoids a confusing | |
| # "Skipped" entry with unresolved matrix names on every PR. | |
| name: CI / GPU | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - "pull-request/[0-9]+" | |
| merge_group: | |
| types: | |
| - checks_requested | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| PIP_NO_CACHE_DIR: "1" | |
| PIP_DISABLE_PIP_VERSION_CHECK: "1" | |
| PIP_PREFER_BINARY: "1" | |
| jobs: | |
| gpu-tests: | |
| runs-on: linux-amd64-gpu-rtxpro6000-latest-1 | |
| container: | |
| image: ubuntu:24.04 | |
| options: -u root --security-opt seccomp=unconfined --shm-size 16g | |
| env: | |
| NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }} | |
| timeout-minutes: 45 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| name: "gpu / py${{ matrix.python-version }}" | |
| steps: | |
| - name: Setup proxy cache | |
| uses: nv-gha-runners/setup-proxy-cache@main | |
| with: | |
| enable-apt: true | |
| - name: Install system dependencies | |
| run: | | |
| export DEBIAN_FRONTEND=noninteractive | |
| apt-get update | |
| apt-get install -y git git-lfs gcc software-properties-common | |
| add-apt-repository -y ppa:deadsnakes/ppa | |
| apt-get update | |
| apt-get install -y \ | |
| python${{ matrix.python-version }} \ | |
| python${{ matrix.python-version }}-venv \ | |
| python${{ matrix.python-version }}-dev | |
| git lfs install | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Verify GPU | |
| run: nvidia-smi | |
| - name: Install dependencies and run tests | |
| run: bash code/scripts/check_python_compat.sh | |
| env: | |
| PYTHON_BIN: python${{ matrix.python-version }} | |
| MODE: train | |
| SKIP_TESTS: "0" | |
| REQUIRE_GPU: "1" | |
| - name: Training + inference with LER check | |
| shell: bash | |
| run: | | |
| source .venv_train_${{ matrix.python-version }}/bin/activate | |
| bash code/scripts/smoke_run.sh 2>&1 | tee /tmp/ci_train.log | |
| r=${PIPESTATUS[0]}; [ $r -ne 0 ] && exit $r | |
| # 0.35: short run (16k samples, 2 epochs for stable LER across py versions) | |
| python code/scripts/check_ler_from_log.py /tmp/ci_train.log --max-ler 0.35 | |
| env: | |
| EXPERIMENT_NAME: ci_short | |
| PREDECODER_TRAIN_SAMPLES: "16384" | |
| PREDECODER_VAL_SAMPLES: "2048" | |
| PREDECODER_TEST_SAMPLES: "2048" | |
| PREDECODER_TRAIN_EPOCHS: "2" | |
| # --------------------------------------------------------------------------- | |
| # Mid-tier (~5-10 min): extended training + inference with LER check. | |
| # Runs only after merge to main (not on PR branches) to save GPU time. | |
| # Single Python version — multi-version coverage is handled by gpu-tests. | |
| # --------------------------------------------------------------------------- | |
| mid-gpu-tests: | |
| if: github.ref == 'refs/heads/main' | |
| needs: gpu-tests | |
| runs-on: linux-amd64-gpu-rtxpro6000-latest-1 | |
| container: | |
| image: ubuntu:24.04 | |
| options: -u root --security-opt seccomp=unconfined --shm-size 16g | |
| env: | |
| NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }} | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Setup proxy cache | |
| uses: nv-gha-runners/setup-proxy-cache@main | |
| with: | |
| enable-apt: true | |
| - name: Install system dependencies | |
| run: | | |
| export DEBIAN_FRONTEND=noninteractive | |
| apt-get update | |
| apt-get install -y git git-lfs gcc software-properties-common | |
| add-apt-repository -y ppa:deadsnakes/ppa | |
| apt-get update | |
| apt-get install -y python3.13 python3.13-venv python3.13-dev | |
| git lfs install | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Verify GPU | |
| run: nvidia-smi | |
| - name: Install Python dependencies | |
| run: | | |
| python3.13 -m venv .venv_mid | |
| . .venv_mid/bin/activate | |
| python -m pip install --upgrade pip setuptools wheel | |
| pip install -r code/requirements_public_train.txt | |
| - name: Mid-tier training + inference with LER check (32k train, 2 epochs) | |
| shell: bash | |
| run: | | |
| . .venv_mid/bin/activate | |
| bash code/scripts/smoke_run.sh 2>&1 | tee /tmp/ci_mid.log | |
| r=${PIPESTATUS[0]}; [ $r -ne 0 ] && exit $r | |
| # 0.2: mid-tier (32k/2 epochs); loosen if flaky | |
| python code/scripts/check_ler_from_log.py /tmp/ci_mid.log --max-ler 0.2 | |
| env: | |
| EXPERIMENT_NAME: ci_mid | |
| PREDECODER_TRAIN_SAMPLES: "32768" | |
| PREDECODER_VAL_SAMPLES: "4096" | |
| PREDECODER_TEST_SAMPLES: "4096" | |
| PREDECODER_TRAIN_EPOCHS: "2" | |
| # --------------------------------------------------------------------------- | |
| # GPU coverage: captures GPU-specific code paths missed by the CPU coverage job | |
| # --------------------------------------------------------------------------- | |
| gpu-coverage: | |
| runs-on: linux-amd64-gpu-rtxpro6000-latest-1 | |
| container: | |
| image: ubuntu:24.04 | |
| options: -u root --security-opt seccomp=unconfined --shm-size 16g | |
| env: | |
| NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }} | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Setup proxy cache | |
| uses: nv-gha-runners/setup-proxy-cache@main | |
| with: | |
| enable-apt: true | |
| - name: Install system dependencies | |
| run: | | |
| export DEBIAN_FRONTEND=noninteractive | |
| apt-get update | |
| apt-get install -y git git-lfs python3 python3-pip python3-venv | |
| git lfs install | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Verify GPU | |
| run: nvidia-smi | |
| - name: Install Python dependencies | |
| run: | | |
| python3 -m venv .venv_gpu_cov | |
| . .venv_gpu_cov/bin/activate | |
| python -m pip install --upgrade pip setuptools wheel | |
| pip install -r code/requirements_public_inference.txt | |
| pip install -r code/requirements_ci.txt | |
| - name: Run tests with GPU coverage | |
| run: | | |
| . .venv_gpu_cov/bin/activate | |
| PYTHONPATH=code coverage run -m unittest discover -s code/tests -p "test_*.py" | |
| coverage report | |
| coverage html -d htmlcov-gpu | |
| coverage xml -o coverage-gpu.xml | |
| - name: Upload GPU coverage artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gpu-coverage-report | |
| path: | | |
| htmlcov-gpu/ | |
| coverage-gpu.xml |