Skip to content

Reduce redundant CI tests and repeated simulation setup - #1337

Merged
yuecideng merged 1 commit into
mainfrom
codex/reduce-redundant-ci-tests
Dec 4, 2026
Merged

yuecideng merged 1 commit into
mainfrom
codex/reduce-redundant-ci-tests

Conversation

@matafela

@matafela matafela commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

Description

pytest collects 18,292 cases, down from 18,384 (92 fewer). This PR consolidates tests across 23 files and updates the light-test references in .ci/test-efficiency-coverage.json.

In a previous full-pr run, the test execution step took 4 h 38 min 47 s. The GPU phase took 2 h 34 min and the simulation phase took 1 h 57 min. Together they accounted for about 97% of the step. This PR targets repeated scene creation, robot initialization, and state readback in those phases. Original CI job

Tests consolidated

Area Net reduction What changed and what the tests still cover
Rigid objects, articulations, and lights 29 Consolidated 13 rigid-object cases, 10 articulation cases, and 6 light cases. The object tests check state after each property or pose update and reset, covering CPU and CUDA inputs for both selected rows and all rows. One native scene now creates and verifies all six light types.
TOPPRA planning and workspace analysis 4 Moved the single-row stationary trajectory case into the batched planner module. The fixed sample count and fixed time interval checks now share a robot scene. Together, the planner changes save one case. Workspace tests save three cases by checking valid sample counts, timing, and manipulability metrics in the relevant sampling modes.
Mono and stereo camera calibration 4 Folded standalone smoke tests into the native batched calibration tests. They check poses for selected rows, intrinsics for the full batch, and both stereo cameras.
Gym rendering, tasks, and layout sampling 18 Reduced recording-camera configuration combinations from 16 to 4 while covering all four manager types, both factories, and both configuration representations. Existing integration runs now check two renderer cold-start scenarios, the PushCube terminal frame, and Franka action gradients. One bidirectional layout run replaces three runs. It checks accepted episodes from all eight environments and verifies that both robot_first and scene_first proposals were selected. Separate unit tests cover one-way selection. Handover still exercises both preloaded and online grasps, with their shared target check run once.
RL training resume 21 Reduced 94 cases to 73 by pruning combinations of algorithm, scheduler, and checkpoint source. The remaining cases exercise each branch, the first update after resume, and failures when checkpoint files are missing.
Asset imports and online data 14 Reduced cold-start import entry points from 11 to 3. Each process still resolves every registered robot asset. Online data tests save 6 cases by consolidating shape checks and using a deterministic sequence to verify that item mode samples a length once per iterator and batch mode samples once per yield.
USD scene imports 2 All three delivery paths share a native scene and a glTF reference image. Each path still gets a pixel comparison, and the USDZ path also checks the texture lifecycle.
Total 92 By CI group, fast collects 44 fewer cases, gpu 18 fewer, and sim 30 fewer. The counts for docs and distributed are unchanged.

Three other cleanups keep the same number of collected cases.

  • All 12 W1 inverse-kinematics seed-sampling cases share the real robot's read-only kinematic chain. Each case constructs its own sampler.
  • The five wheel checks share one completed installation across local xdist workers in a pytest run. Each check still runs in its own subprocess.
  • Removed 436 lines of identical definitions from tests/sim/spawn/test_visuals.py, covering 12 test functions and one helper. The later definitions already shadowed the earlier ones, so pytest still collects 126 cases from the file.

Validation and timings

Each row shows pytest elapsed time for the specified group, run separately on the same machine in py312. The full PR job duration still needs to be measured in CI.

Test group Before After
Eight-environment layout sampling 105.53 s 35.32 s
Focused rigid-object, articulation, and point-light checks 68.04 s 31.70 s
Focused TOPPRA and six-light-type checks 42.45 s 19.99 s
W1 inverse-kinematics seed sampling 23.57 s 14.71 s
Native mono and stereo calibration 13.41 s 9.81 s
Three USD delivery paths 15.00 s 9.22 s

Full test collection completed before and after the change. Focused tests exercised native simulation, GPU readback, and wheel installation with multiple workers. All 192 tests in tests/ci passed.

Type of change

  • Enhancement

Checklist

  • Ran black . with Black 26.10.1 and passed the repository-wide formatting check.
  • Reviewed the affected project context. The changes cover test organization and coverage mapping. The existing feature descriptions, entry points, and usage instructions remain accurate.
  • Ran python docs/scripts/check_api_docs.py. All 5,081 public exports are documented.
  • Reviewed the assertions, parameter branches, and need for each consolidated test, and ran the focused checks listed above.
  • Confirmed that the repository lock files for Python 3.11 and 3.12 already include filelock, which the wheel tests use.

@matafela matafela added ci Continuous integration, build automation and release automation. performance Performance, memory, throughput and synchronization-cost improvements. labels Dec 4, 2026
@greptile-apps

greptile-apps Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5RetriggerView in Greptile

[Low impact] The PR appears safe to merge; no actionable regression was found.

Summary

This PR reduces repeated test setup without changing production code.

  • Rigid-object and articulation checks reuse simulation scenes.
  • Light checks create all six types in one scene.
  • Camera checks cover selected poses and batch intrinsics together.
  • One USD scene compares all three delivery paths.
  • Motion tests reuse robot setup while retaining planner and workspace checks.
  • Gym and layout checks combine runs while keeping distinct scenarios.
  • Resume tests keep branch coverage with fewer combinations.
  • Asset import checks use three cold-start entry points.
  • Online-data checks use one deterministic sampler for item and batch modes.
  • Wheel checks share one installation across local workers.
  • Shadowed visual-test definitions are removed.

No actionable issue was found. This review used source inspection; tests were not run.

Reviews (2) · Last reviewed commit: "test(ci): consolidate redundant tests an..." · Reviewed by Greptile

@matafela
matafela requested a review from yuecideng December 4, 2026 10:24
@matafela matafela closed this Dec 4, 2026
@matafela matafela reopened this Dec 4, 2026
@yuecideng
yuecideng merged commit 16445a7 into main Dec 4, 2026
34 of 40 checks passed
@yuecideng
yuecideng deleted the codex/reduce-redundant-ci-tests branch December 4, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous integration, build automation and release automation. performance Performance, memory, throughput and synchronization-cost improvements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants