Skip to content

[CI] Stop rebuilding Docker images for nightly version bumps; warm the cuRobo cache - #8818

Merged
StafaH merged 6 commits into
isaac-sim:mainfrom
StafaH:ci/speedup-sweep-2
Oct 26, 2026
Merged

StafaH merged 6 commits into
isaac-sim:mainfrom
StafaH:ci/speedup-sweep-2

Conversation

@StafaH

@StafaH StafaH commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This is a follow-up to #8802. Across the last 40 PR runs of Docker + Tests, the median wall time is 23 min, but the p75 is 43 min. The two groups don't overlap: every run that took 40–65 min rebuilt a Docker image, and every run that didn't finished in 14–28 min. This PR targets the rebuilds, plus one serial test job.

Where the slow runs go

Runs Wall time
Both deps caches hit ~24/40 14–28 min
Deps cache missed (base, cuRobo, or both) ~16/40 30–65 min

What happens on a cache miss:

  • cuRobo image: 23–47 min, all of it on the critical path. One 30-min build broke down as: 4 min pulling cache layers, 2 min uv sync, 7.5 min recompiling cuRobo (its layer sits after the lockfile COPY), 3 min exporting layers, 10 min --load tarball into the daemon, and 1 min cache export.
  • Base image: about 20 min. That splits into 3.4 min cache pull, 2.3 min uv sync, 4.6 min exporting layers, 6 min --load tarball, and 1.5 min cache export.

Why the cache misses so often:

  1. The nightly version bump. The [CI][Auto Version Bump] commit rewrites version = "..." in each bumped package's pyproject.toml and its editable uv.lock entry. Both files feed the deps hash, so every day's first PR rebuilt the images even though no dependency changed. Replaying main over Oct 15–25: 18 distinct deps hashes before this PR, 9 after. The remaining 9 are real changes to docker/, the isaaclab.cli sources, or dependencies.
  2. Only the base image was built post-merge. build-curobo skipped push events, so the cuRobo deps cache was never warmed. Several runs hit the base image cache (0.3 min) and still spent 25–30 min building cuRobo.

Changes

  1. Ignore first-party version bumps in the deps hash (_lib/compute-deps-hash).

    • Manifests are now hashed by content, with two kinds of line dropped: version = in a [project]/[package] table, and version = in uv.lock entries whose source is editable or virtual.
    • Third-party lock versions and all dependency specifiers are still hashed.
    • Covered by a new test in test_registry_credential_fallback.py. It fails against the old hash code.
    • Trade-off: an image served from the deps cache can report a stale importlib.metadata.version() for first-party packages. The source is bind-mounted, so the code under test is current. No CI test in the Docker jobs checks these versions (test_wheel.py runs in install-ci).
  2. Build the cuRobo image on pushes to protected branches, with no test consumer. This matches what the base image already does. A cache hit costs about 0.3 min of a GPU runner.

  3. test-curobo: test-jobs: "3". The job ran its three files one at a time, about 9.7 min in total (test_pink_ik.py ~410 s, planner franka ~100 s, cube stack ~73 s). Run concurrently, the job should be bounded by test_pink_ik.py at about 7 min. Since [CI] Shorten the slowest PR jobs: warm Warp kernels, contrib on base image, more standalone workers #8802 moved contrib off the cuRobo image, test-curobo is the last job to finish in the newest runs.

  4. Standalone demos (Kit): 4 → 3 concurrent launches. In 2 of the last 8 runs (here and on an unrelated PR, both on the same main commit), microduck_warehouse hung at startup right after the Newton viewer fell back to headless EGL, and was killed at the 300 s launch timeout. In passing runs it takes about 110 s, and the slowest Kit launch about 148 s. The non-Kit job has passed every run and stays at 4.

  5. De-flake test_sphere_contact_time[cuda-mesh] (PhysX contact sensor). The sphere's contact pose put its center at z = 0, half buried. On the cobblestone triangle mesh, GPU PhysX sometimes resolves that overlap below the mesh, which then reports no contact. It failed 5/5 retries in one run here, and locally 21/80 with four concurrent processes; it passes on an idle GPU. With a 5 cm penetration (z = 0.2), 80/80 pass under the same load.

This PR touches docker-build/action.yml's deps-hash inputs, so its own CI run does a full rebuild of both images. Expect a slow first run.

Follow-ups (not in this PR)

  • Skip --load on ECR builds (6–10 min per rebuilt image). The docker-container builder exports the whole image as a tarball into the daemon, only so that the "Layer CI test dependencies" step and the base invariants check can run locally. Possible fix:
    • fold the pytest layer into the build (a temp Dockerfile that appends it, or a FROM stage);
    • push straight from buildx (push=true, both tags);
    • run test_image_invariants.py against a staging tag, then alias the commit and deps tags with imagetools create.
  • Compile cuRobo in a stage that doesn't depend on the lockfile. It is rebuilt (7.5 min) on any uv.lock or pyproject change because it comes after the uv sync layers. Keying it on the torch/CUDA version would let it hit the layer cache.
  • test_pink_ik.py: building the FixedBaseUpperBodyIK-G1 env takes about 2 min, versus about 7 s for the other three envs. Splitting the file with xdist would need --dist loadgroup; the default load mode would build every env on every worker.
  • Infra: runners take about 3 min to pick up jobs after the image build, and each job pulls a 2–4 min image. The ideas from [CI] Shorten the slowest PR jobs: warm Warp kernels, contrib on base image, more standalone workers #8802 still apply: AMI-baked base layers or SOCI, and a warm runner pool.

Test plan

🤖 Generated with Claude Code

The nightly changelog job rewrites each bumped package's own version line
in its pyproject.toml and editable uv.lock entry. No installed dependency
changes, but the hash did, so the first PR after every bump rebuilt both CI
images on its critical path.
Only the base image was rebuilt post-merge, so a dependency change left the
cuRobo deps-cache cold and the next PR built it (25-45 min) before
test-curobo could start.
The job ran them one at a time (~9.7 min). test_pink_ik.py alone takes
~7 min, so the two planner files can finish beside it.
@StafaH
StafaH marked this pull request as ready for review October 25, 2026 20:43
@StafaH
StafaH requested a review from a team October 25, 2026 20:43
@StafaH

StafaH commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Oct 25, 2026
@greptile-apps

greptile-apps Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge; no actionable issues were established.

Summary

This PR reduces repeated Docker builds and runs the cuRobo tests concurrently.

  • First-party version bumps keep Docker dependency caches reusable.
  • Pushes now warm the cuRobo image cache for later pull requests.
  • The cuRobo tests run in three file slots.

No actionable issues were established. Tests were not executed during this review.

Acknowledgment: StafaH explicitly accepts stale first-party package versions in cached image metadata because tests use current source.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  Inputs[Build files and manifests] --> Normalize[Ignore first-party version lines]
  Normalize --> Hash[Compute dependency hash]
  Hash --> Lookup{Cached image exists?}
  Lookup -->|Yes| Reuse[Reuse cached image]
  Lookup -->|No| Build[Build and publish image]
  Push[Protected-branch push] --> Warm[Warm base and cuRobo caches]
  Reuse --> PR[PR tests]
  Build --> PR
  PR --> Concurrent[Run three cuRobo test files concurrently]
Loading

Reviews (1) · Last reviewed commit: "Run the three test-curobo files concurre..." · Reviewed by Greptile

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isaac Lab Review Bot

All reviewed code categories look good.

  • PR description: Fix the stale action path, remove the attribution, and substantiate the projected test-curobo speedup with baseline/candidate revisions, command, GPU runner, backend, three-file workload, warmup state, and wall time.
  • Design and architecture: Architecture looks good.
  • Scope and over-engineering: No over-engineering issues.
  • API: API changes look good.
  • Compatibility and deprecation: No breaking changes identified.
  • Implementation: Implementation looks good.
  • Style consistency: Style consistency looks good.
  • Test quality: Test quality looks good.

No blocking issues. No inline findings.

Automated review; human maintainers own approval decisions.

With four, microduck_warehouse intermittently hung at startup past the
300 s launch timeout in 2 of the last 8 runs. The non-Kit job keeps four.
@StafaH

StafaH commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Oct 25, 2026
The sphere's contact pose put its center at z = 0, half buried. On the
cobblestone mesh terrain that center sits on the triangles, and GPU PhysX
can resolve the overlap below the mesh, after which the mesh reports no
contact. test_sphere_contact_time[cuda-mesh] then sees zero contact time.
Which way it resolves depends on GPU scheduling, so the case fails under
concurrent CI load (5/5 retries in one PR run; 21/80 locally with four
concurrent processes) and passes on an idle GPU.

A 0.05 m penetration keeps the sphere above the mesh: 80/80 runs pass
under the same load.
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Oct 26, 2026
@StafaH

StafaH commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Oct 26, 2026
@StafaH
StafaH merged commit 8ef61bd into isaac-sim:main Oct 26, 2026
60 checks passed
@StafaH
StafaH deleted the ci/speedup-sweep-2 branch October 26, 2026 04:08
StafaH added a commit that referenced this pull request Oct 26, 2026
## Summary

This is a test-side follow-up to #8818. I audited the slowest CI test
files package by package (core, Newton, PhysX/OV, tasks/standalone),
using per-case junit times from a recent PR run and the
`isaaclab-auditing-tests` criteria.

The main finding is that most slow files are slow for real reasons:
one-time Kit or Warp warmup in the first case, or axes that really reach
different backends or assets. They are not slow because they repeat each
other. Recent audits (#8010 and others) had already pruned a lot. So
this PR is a small set of high-confidence cuts, plus two CI changes that
save the most time.

The diff has no production changes: 21 lines added, 176 removed, all in
tests and CI.

## Changes

**CI routing (largest time savings)**
- **Standalone demos jobs now run only the launch matrix.** Both demos
jobs were re-running the file's 40 supervisor, AST-discovery and
script-wiring tests. Those tests ignore the runtime group and already
pass in `isaaclab (core) [1/3]`. That was about 58 s of test time per
demos job (measured in junit). I checked locally that the new `-k` still
collects all 16 demo launch cases.
- **Newton solver-matrix kernels are now warmed after merges.**
`test_initialize_solver_populates_canonical_state[kamino_internal_contacts]`
took 142 s in CI, and almost all of it is compiling Kamino's collision
detector: 1.7 s with a warm cache. Nothing in the post-merge warmer
compiles Kamino, so this case is the long pole of the `isaaclab_newton`
job. The file is now in `warp-cache-warm`.

**Removed tests, each with its keeper**

| Removed | Keeper |
|---|---|
| `test_franka_pose_abs` (OSC) |
`test_franka_pose_abs_with_nullspace_centering` uses the identical
controller config plus a nullspace term.
`..._fixed_impedance_with_gravity_compensation` keeps the
`nullspace_control="none"` branch. |
|
`test_{training,play}_dispatches_libraries_to_explicitly_named_adapters`
(8 cases) | These string-matched the private
`dispatch._RL_WORKFLOW_MODULES`. `test_training_and_play_write_bundles`
goes through the same dispatch map and asserts `run.framework ==
library`, which each adapter hard-codes. |
| `test_adapters_default_to_one_warmup_step` (8 cases) | The same bundle
test asserts `warmup_steps == 1` for every library in both train and
play. That value is `args_cli.warmup_steps`. |
| OV IMU/PVA `test_single_dof_pendulum` and `test_indirect_attachment` |
None needed. These were permanent `@skip` stubs whose bodies were just
`pytest.fail("port from …")`, pointing at PhysX tests that no longer
exist. |

**Parametrization**
- **OV `test_frame_transformer_duplicate_body_names`: 4 cases → 2.** Its
comment says each value is covered once, but device was crossed with the
path cases. Device is now folded into those two cases;
`test_frame_transformer_feet_wrt_base` still covers both devices.
- **Newton `test_filtered_contact_forces_and_points`: CUDA only.** It
was the only test in the file crossing device with the pipeline. The
file documents that the sensor has no device-specific path, and the
rotated lifecycle and horizontal-collision cases keep CPU coverage.

**Test quality**
- **`test_terrain_generator.py` no longer depends on test order.** Three
tests edited the module-level `ROUGH_TERRAINS_CFG` in place, so
`test_terrain_flat_patches` ran with whatever cache, seed and curriculum
settings an earlier test left. Each test now takes
`ROUGH_TERRAINS_CFG.copy()`, which is a deep copy.

## Checked and kept
- **The three backend env-smoke files** (PhysX, OvPhysX, Newton): each
forces a different physics preset.
- **The benchmark e2e over 4 RL libraries:** each library has its own
train and play adapter.
- **`test_valid_configs`** (131 s): it is the only per-asset spawn
contract.
- **Newton `test_newton_cfg_post_init_propagates_class_type`:** it costs
about 0 s, needs no simulation, and pinpoints the failure better than
the GPU test that would also catch it.
- **The 142 s Kamino case:** it is the only coverage of that solver
path. The fix is warming its kernels, not deleting it.
- **Big first-case times:** OSC 101 s, OV articulation 97 s, Newton
actuators-on-PhysX 113 s. These are app and kernel warmup.

## Follow-ups (not in this PR, lower confidence)
-
**`test_bam_actuator_mjwarp::test_native_pendulum_matches_recorded_trajectory[cpu-*]`**
(about 26 s, mostly CPU kernel compile). This is the only CPU-device run
of the full BAM trajectory against its golden; deciding whether to drop
it needs the actuator owners.
- **`test_rl_device_separation::test_sb3_device_separation_gpu`** could
fold into the SB3 case of `test_wrappers.py` by adding the numpy type
assertions there.
- **OV contact sensor `test_multi_body_per_sensor_indexing`** crosses
device with detail mode (8 cases). 4 rotated cases would still cover
each flag on and off.
- **OV IMU/PVA `test_reset` and
`test_no_stale_data_after_scene_reset`:** the CPU cases could move to
`test_devices(DeviceScope.CUDA)`.
- **Perf outliers to profile:** `Isaac-Reach-Franka-OSC` takes 103 s on
PhysX and 93 s on OvPhysX, vs 2 s on Newton.
`IsaacContrib-Velocity-Flat-UnitreeA1` takes 99 s, vs 14 s for the Rough
variant.

## Test plan
- [x] `test_terrain_generator.py`: 27 passed locally.
- [x] Newton `test_contact_sensor.py -k filtered`: passes on CUDA.
- [x] Standalone `-k` collects exactly the 16 launch-matrix cases (it
was 16 plus 24 duplicated cases).
- [x] `py_compile` on changed files, YAML load, pre-commit, and the
changelog check against upstream main.
- [ ] CI: the OSC (needs Kit) and OV (needs the `ovphysx` wheel) files
run in CI only. The benchmark adapter files already fail locally on the
baseline (missing `skrl`/`sb3`, no Kit) and run in CI.
- [ ] CI: the `warp-cache-warm` change only runs post-merge.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants