Speed up CI tests and use CPU-only PyTorch in pip CI - #580
Merged
Conversation
RussTedrake
commented
Sep 8, 2026
RussTedrake
left a comment
Owner
Author
There was a problem hiding this comment.
@RussTedrake reviewed 5 files and all commit messages, and made 1 comment.
Reviewable status: 0 of 5 files reviewed, all discussions resolved.
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.
Letter font and dimension tests repeatedly ran expensive convex decomposition, while model conversion tested every Menagerie scene on every CI run. Focus these tests on the behavior each needs to exercise and add timing reports to measure the result.
TEST_ALL_MENAGERIE=1retains the full conversion sweep for Menagerie revision updates. Its smoke-test contract remains conversion success; stronger asset and parser checks apply to the two representative scenes. Some other upstream OBJ files already contain dangling material references.Drake's Menagerie test covers raw MJCF parsing (including expected STL failures), not this repository's conversion pipeline. Local synthetic converter tests remain in place.
Validation and measurements
The targeted tests saved about 99s on macOS and 111s on Ubuntu. Other setup/notebook timings still vary across runners. The unchanged pip test job passed in 9m04s, and lint passed in 1m09s. JUnit reports from both Poetry runners were downloaded to verify these measurements.
Download caches were also evaluated during this PR and removed. Linux restore + installation was 13–25s slower; macOS showed no repeatable gain. The unused experimental caches were deleted. The final change adds no caching machinery.
CI-only CPU wheels
The Linux pip job now selects torch/torchvision from PyTorch's CPU wheel index and retains those exact builds using a temporary constraints file during the published
manipulation[all]install. Import checks verify both CPU build tags and the absence of a CUDA build. This does not modifypyproject.toml,poetry.lock, or published dependency metadata; downstream GPU installations remain supported. Poetry CI is unchanged.CPU-wheel CI passed all jobs. The pip job installed torch 2.14.0+cpu and torchvision 0.29.0+cpu, retained those builds through the manipulation install, and passed all 72 tests with no skips.
The unchanged Ubuntu Poetry and macOS jobs passed in 8m42s and 8m13s respectively. Workflow YAML/shell syntax checks passed locally. No changes were made to the package manifest or lockfile.
Poetry experiment result
A temporary CPU override for Linux Poetry was also evaluated. It preserved locked versions and original metadata, but full setup took 2m08s versus 2m17s in the prior run: only a nine-second difference. Given runner variability, added re-locking machinery, and macOS remaining above eight minutes, the override was removed. That experiment was superseded after successful setup. The final tree is byte-for-byte identical to the previously passing CPU-pip-only revision
210d981.This change is
Ubuntu prerequisite cleanup
Ubuntu Poetry CI now skips system Jupyter packages (
INSTALL_JUPYTER=0) because its Python environment supplies the notebook dependencies. Local prerequisite installation and pip CI keep their existing default; the pip notebook harness relies on system nbformat/nbconvert. Both Ubuntu jobs use the distribution Git package, retain apt lists until dependency setup completes, and avoid a redundant apt update in the prerequisite script. This preserves clean-container installation coverage while reducing duplicate setup work.Validation: shell syntax and commit checks passed; final CI is green on all jobs. Ubuntu Poetry finished in 8m00s versus 9m22s on the preceding baseline. Dependency setup fell from 2m51s to 2m06s (the first attempt also measured 2m05s), prefetch from 51s to 29s, and tests from 5m04s to 4m59s. Faster downloads also contributed, so the full 82-second improvement is not attributed solely to the code change. Final pip CI: 6m55s; macOS: 7m40s.