ci: skip CUDA wheels in mypy/pyright typecheck jobs - #1598
Merged
Merged
Conversation
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
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pyrightandmypyjobs ran a bareuv sync, installing torch 2.8.0+cu128 (1.7GB), 72nvidia-*CUDA wheels (4.1GB), and triton (541MB) — ~6.3GB of the 7.5GB venv — on 1-vCPUubuntu-slimrunners to type-check 106 source files.benchmark-smoke/testjobs, which already skip the CUDA packages, install in under a minute.torch/nvidia-*-cu12/tritonduringuv sync, install CPUtorch==2.8.0(matches the version pinned inuv.lock; torch's.pyistubs are identical between CPU and CUDA builds), and switch the Check steps touv run --no-syncso uv does not re-sync the swapped torch back to the cu128 build.Linked Work
mainValidation
make test-allpassed on the final local head before this PR was created or updatedCommands actually run:
The 7 pyright warnings are all
reportMissingImportsfor optional extras (mujoco,glfw,drake_uni) that are equally absent from today's CI pyright env (bareuv syncinstalls no extras) — check results are unchanged.Remote CI route:
main: current-head CI run https://github.com/Motphys/UniLab/actions/runs/35073718861 — all jobs success. Measured on this head: pyright install 47s + check 26s (was 4m55s + 1m24s); mypy install 29s + check 10s (was 3m05s + 23s).Impact
Artifacts
Checklist
testjob still installs CPU torch 2.7.0 whileuv.lockpins 2.8.0; aligning it is a separate concern)