Repository navigation
[SC-18919] Cut library CI time by dropping unused GPU packages and caching installs - #568
Merged
juanmleng merged 4 commits intoOct 22, 2026
Conversation
PyPI's Linux torch pulls ~3 GB of NVIDIA libraries the CI runner cannot use. Route torch to the PyTorch CPU index for this repo's own installs (uv-only setting; the published package still depends on plain torch), and relock: the NVIDIA/CUDA packages and triton drop out, and CI keeps testing torch 2.8.0. - Drop the torch==2.0.1 reinstall: the next install step already put the locked version back, so the tests never ran on 2.0.1 - Drop the Free Disk Space step, which only made room for the GPU wheels - Keep downloaded wheels in the uv cache between runs - Stop the job after 30 minutes instead of the 6-hour default - Integration: drop the dependency install whose venv was deleted unused before the [all] install Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
uv pip compile reads tool.uv.sources, so the max leg pinned the CPU-only torch build (torch==2.x+cpu), which pip cannot find on PyPI. Pass --no-sources so the leg resolves torch as users get it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cache key hashed uv.lock, so every lock-only change (dependency bumps) missed the cache and recompiled blis and thinc, which have no Python 3.9 wheels, for ~8 minutes. Keying on pyproject.toml lets those runs reuse the cache and download only the packages that changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
juanmleng
marked this pull request as ready for review
October 21, 2026 18:51
cachafla
approved these changes
Oct 22, 2026
…rch index Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
juanmleng
deleted the
juan/sc-18919/cut-library-ci-time-by-dropping-unused-gpu-package
branch
October 22, 2026 19:36
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.
Pull Request Description
What and why?
Engineers waited 10 to 17 minutes on the pull request check, and one run hung for six hours. Most of it was setup: every run downloaded about 3 GB of GPU libraries the test machine cannot use, reinstalled PyTorch a second time at an old version that the next step immediately undid, cleared disk space to fit it all, and, whenever the lock file changed, rebuilt two packages from source because the download cache was discarded.
The repository's own installs now use the CPU-only build of PyTorch on Linux, at the version CI already tested (2.8.0 on Python 3.9), so the GPU libraries, the second PyTorch install and the disk-space step are gone. Downloaded packages are kept between runs and survive lock-file-only updates such as dependency bumps, and the job stops after 30 minutes. Every check still runs: lint, notebook checks, unit tests and both docs builds. The integration workflow drops an install whose environment was deleted before anything used it.
The CPU-only setting applies only to installs inside this repository. The published package still depends on plain
torch, sopip install validmindis unchanged, and the two checks that exist to test what users install, the integration[all]install and the dependency compatibility matrix, still install the standard PyTorch from PyPI.How to test
Automated tests
CI on this PR runs the full set of checks. Expected: "Code Quality and Unit Testing" and all "Dependency Compatibility Testing" legs pass.
From the repository root, on this branch:
Expected: the lock is consistent,
0triton entries, and one NVIDIA package,nvidia-nccl-cu12, which xgboost needs on Linux.Expected:
torch>=2.0.0for theall,llmandpytorchextras, the same as onmain.uv pip compile pyproject.toml --no-sources -p 3.10 --python-platform x86_64-manylinux_2_28 --all-extras --upgrade -o /tmp/max.txt grep -E '^(torch|nvidia-cudnn)' /tmp/max.txtExpected: a plain
torch==pin with no+cpu, plus the CUDA packages, as the dependency matrix's "max" leg installs.Manual testing
+ torch==2.8.0+cpu, notriton, no NVIDIA package other thannvidia-nccl-cu12, and notorchchange in theaequitas fairlearn vl-convert-pythoninstall.Cache hit for: setup-uv-1-…. A run without a cache hit is expected afterpyproject.tomlchanges, and on the first run onmainafter this merges.The integration workflow runs only on pushes to
mainandprod, so its change is verified on the first run after merge.What needs special review?
pyproject.toml[tool.uv.index]/[tool.uv.sources]: Linux-only, uv-only routing oftorchto the PyTorch CPU index; the built wheel's metadata is unchanged.dependency-testing.yaml:--no-sourceskeeps the "max" leg resolving PyPI torch; without it the leg pins a+cpubuild that pip cannot find.python.yamlcache-dependency-glob: pyproject.toml: the cache now refreshes only whenpyproject.tomlchanges, and lock-only changes download the changed packages on top of it.Dependencies, breaking changes, and deployment notes
No breaking changes and nothing to deploy. Linux developers who run
uv syncnow get the CPU-only PyTorch; GPU work in a local environment needs a CUDA build installed by hand. On Python 3.10 and later, Linux environments also move from PyTorch 2.11.0 to 2.14.1, because changing where uv gets PyTorch makes it pick a version again, the newest one allowed. #556 also adds a[tool.uv.sources]table and regeneratesuv.lock, so whichever merges second merges the two tables and re-runsuv lock.Release notes
Internal change to CI and the development environment only; no release notes.
Checklist
🤖 Generated with Claude Code