From d47ede0c6203b4242f35b190f7035560a8b78447 Mon Sep 17 00:00:00 2001 From: TATP-233 Date: Wed, 16 Sep 2026 16:25:09 +0800 Subject: [PATCH] ci: skip CUDA wheels in mypy/pyright typecheck jobs The pyright and mypy jobs ran a bare `uv sync`, installing torch 2.8.0+cu128, 72 nvidia-* CUDA wheels, and triton (~6.3GB of the 7.5GB venv) on 1-vCPU ubuntu-slim runners just to type-check 106 source files. Measured on run 35070480055: pyright install step 4m55s vs a 1m24s check; the analysis itself is ~4s. Apply the pattern already used by the benchmark-smoke and test jobs: skip torch/nvidia-*/triton during sync, install CPU torch 2.8.0 (matches the version pinned in uv.lock; .pyi stubs are identical to the CUDA build), and run the checks with `uv run --no-sync` so uv does not re-sync the swapped torch back to cu128. Validated against a faithful scratch venv (CPU torch, no nvidia/ triton): pyright 0 errors with the same 7 optional-import warnings as today (mujoco/glfw/drake_uni are extras, absent from both envs), mypy success on 128 files. Closes #1597 --- .github/workflows/ci.yml | 44 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 024023fd5..c654214e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,9 +72,27 @@ jobs: with: enable-cache: true - name: Install dependencies - run: uv sync + run: | + uv sync \ + --no-install-package torch \ + --no-install-package nvidia-cublas-cu12 \ + --no-install-package nvidia-cuda-cupti-cu12 \ + --no-install-package nvidia-cuda-nvrtc-cu12 \ + --no-install-package nvidia-cuda-runtime-cu12 \ + --no-install-package nvidia-cudnn-cu12 \ + --no-install-package nvidia-cufft-cu12 \ + --no-install-package nvidia-cufile-cu12 \ + --no-install-package nvidia-curand-cu12 \ + --no-install-package nvidia-cusolver-cu12 \ + --no-install-package nvidia-cusparse-cu12 \ + --no-install-package nvidia-cusparselt-cu12 \ + --no-install-package nvidia-nccl-cu12 \ + --no-install-package nvidia-nvjitlink-cu12 \ + --no-install-package nvidia-nvtx-cu12 \ + --no-install-package triton + uv pip install torch==2.8.0 --index-url https://download.pytorch.org/whl/cpu - name: Check - run: uv run mypy src/unilab + run: uv run --no-sync mypy src/unilab pyright: if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' @@ -90,9 +108,27 @@ jobs: with: enable-cache: true - name: Install dependencies - run: uv sync + run: | + uv sync \ + --no-install-package torch \ + --no-install-package nvidia-cublas-cu12 \ + --no-install-package nvidia-cuda-cupti-cu12 \ + --no-install-package nvidia-cuda-nvrtc-cu12 \ + --no-install-package nvidia-cuda-runtime-cu12 \ + --no-install-package nvidia-cudnn-cu12 \ + --no-install-package nvidia-cufft-cu12 \ + --no-install-package nvidia-cufile-cu12 \ + --no-install-package nvidia-curand-cu12 \ + --no-install-package nvidia-cusolver-cu12 \ + --no-install-package nvidia-cusparse-cu12 \ + --no-install-package nvidia-cusparselt-cu12 \ + --no-install-package nvidia-nccl-cu12 \ + --no-install-package nvidia-nvjitlink-cu12 \ + --no-install-package nvidia-nvtx-cu12 \ + --no-install-package triton + uv pip install torch==2.8.0 --index-url https://download.pytorch.org/whl/cpu - name: Check - run: uv run pyright + run: uv run --no-sync pyright benchmark-smoke: if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'