Repository navigation
[Backport release/3.0.0] Core and Newton test pruning (#8022, #8008) - #8031
Conversation
…m#8022) The core job (`pytest tools`, excluding `isaaclab_*` packages, as the three core CI shards run it) ran on the same machine with a warm Warp cache, once on `develop` and once on this PR. - **Timing fix.** In the worktree the two benchmark smoke files launched the system Python and failed fast. The pruned time is corrected with their 2:00 baseline duration; they are unchanged by this PR. - **Shared failures.** Six files fail on both sides only because of local tools and environment: video conversion, `nsys`, device constructors and visualizer markers. - **Fixed here.** The four asset interface files that fail on `develop` fail because of an OVPhysX fixture bug, which this PR fixes. | | `develop` | this PR | |---|---:|---:| | Core job wall time | 32:18 | **22:40** | | Test files | 312 | 289 | | Test functions | 3,069 | 2,229 | | Test lines | 97,369 | 81,275 | Changes outside test files: - `tools/test_settings.py` drops `TESTS_TO_SKIP` entries for five deleted files. - `docs/source/refs/contributing.rst` pointed at the deleted `deps/test_torch.py`; it now points at `utils/test_circular_buffer.py`. Pruned with the `isaaclab-auditing-tests` skill (isaac-sim#8007), campaign mode. The work ran in seven lanes: - sim - assets - sensors - envs / managers / controllers / actuators - scene / cloner / renderers / markers - utils - CLI / app / benchmarks **Method.** Every test was marked keep, fix, merge or delete. Whenever a deletion's keeper does not carry the assertions verbatim, a deliberate production mutation proves the keeper fails. An independent review per lane restored every gap it found, each mutation-proven: - OSC variable-impedance masking - render interval in all three workflows - per-backend deprecated friction writer - CPU segmentation - ray-caster mesh cache - rendering-kit defaults - non-default `dt` - schema API application - joint drive type - file-log level - global torque reset - terrain origins - **Largest cuts:** - asset interface tests: mocked cases ~6,400 → ~1,050; about 114 getter tests became 4 table tests, with rows diffed mechanically - 10 OSC convergence sims, covered by the repaired unit-law test - manager tests moved off Kit - actuator and rendering cartesian products - SimulationContext 52 → 30 tests - **Tests that could not fail, now fixed:** - partial writes with a non-trivial joint/body ordering - alias equality compared by shape only - writer read-backs - schema validators that inspected only children - `test_reset` lifecycle checks - a camera test that compared a shared cache with itself - **Multi-GPU lane:** tests now use `DeviceScope.DEFAULT_CUDA` or `CPU_AND_DEFAULT_CUDA`, so no file enters the multi-GPU job unless it boots Kit with `resolve_test_sim_device()`. Merged with isaac-sim#7995. Its new renderer source-scan test was not carried over: the behavior it guards, SDP writing geometry into Fabric, is covered by `test_scene_data_geometry.py`. - When physics handles decimation, the render check only fires on exact multiples. For example, `render_interval=10` with `decimation=4` renders at half rate. This affects all four env classes. - PhysX-Fabric FrameView: after a USD parent move, whichever of the world/local reads comes second is stale. - The MJCF physics scene is written to payload layers, not under the default prim. - PhysX fixed-tendon position limits are `(N, T, 2)`, which contradicts the docstring and OVPhysX. - EventManager does not register class terms when created while the sim is already playing. - `FrameTransformer.__str__` swaps the frame count and names. - RigidObjectCollection `set_coms_index` raises KeyError on PhysX. - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] My changes generate no new warnings - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there --------- Co-authored-by: Octi Zhang <[email protected]> (cherry picked from commit fbfd453)
# Newton test suite: 11:23 → 7:54 (−31%) The `isaaclab_newton` suite runs through `pytest tools` on the same machine with a warm Warp cache. All 38 files pass. | | `develop` | this PR | |---|---:|---:| | Suite wall time | 11:23 | **7:54** | | Test functions | 411 | 297 | | Test lines | 19,085 | 15,880 | ## What changed The whole test surface was pruned with the `isaaclab-auditing-tests` skill (isaac-sim#8007). **Method.** Every test was marked keep, fix, merge or delete. Whenever a deletion's keeper does not carry the assertions verbatim, a deliberate production mutation proves the keeper fails. An independent review then restored every gap it found. The only production change is `transform_to_vec_quat` raising its documented `ValueError`; it has a changelog entry. - **Merged:** tests that rebuilt the same scene now share one build: - frame transformer: 5 scenes → 1 - contact filter + stale-reset - IMU/PVA init + freefall - joint-wrench init/reset - limits: 14 builds → 4 - root/COM writes - dynamics accessors - rigid/collection write tests - **Deleted:** - manager class checks implied by the end-to-end solver test - `test_wrench_kernels.py` - private helper replays in `test_site_injection.py` - the joint-wrench oracle that repeated the production transform - the duplicate effort-limit test (the PhysX copy is kept) - **Fixed tests that could not fail:** - delayed/remotized PD equivalence, which passed with no delay authored - DC-motor clamp - IMU stale-data (isaac-sim#4970) - `set_coms_index` - joint targets, now checked by value instead of with a launch spy - **Restored:** four tests isaac-sim#8003 removed without a remaining proof (`TestDelayedPDAuthoring` and the material-property tests). - **Device axes:** device-independent bookkeeping runs on CUDA only. Every public writer family keeps a real-simulation CPU test. ## Product defects found (not fixed here) - **Newton `ArticulationView` misaddresses per-env shapes** for rigid-object collections. - **`RigidObject.body_link_vel_w` can read stale** after a COM velocity write. ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] My changes generate no new warnings - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there --------- Signed-off-by: Octi Zhang <[email protected]> Co-authored-by: Octi Zhang <[email protected]> (cherry picked from commit 04573e6)
|
run-ci |
|
| if t.ndim > 3: | ||
| raise ValueError(f"Expected 1D, 2D, or 3D transform array, got ndim={t.ndim}") |
There was a problem hiding this comment.
Zero-dimensional arrays lose ValueError A zero-dimensional
wp.transformf array passes this guard and reaches indexing meant for a three-dimensional array. The function previously raised ValueError for this unsupported shape; it now exposes a Warp indexing error instead. Check the lower bound as well as the upper bound.
| if t.ndim > 3: | |
| raise ValueError(f"Expected 1D, 2D, or 3D transform array, got ndim={t.ndim}") | |
| if t.ndim < 1 or t.ndim > 3: | |
| raise ValueError(f"Expected 1D, 2D, or 3D transform array, got ndim={t.ndim}") |
| replicate(sim.get_clone_plan()) | ||
| with pytest.raises(ValueError): | ||
| with pytest.raises(ValueError, match=f"default {quantity} out of the limits"): |
There was a problem hiding this comment.
Clone plan runs twice This test dispatches the same clone plan again inside the
pytest.raises block. Each dispatch rebuilds the Newton model, adding setup work to both test cases without checking another behavior. A single dispatch inside the block is enough to test the expected initialization error.
| replicate(sim.get_clone_plan()) | |
| with pytest.raises(ValueError): | |
| with pytest.raises(ValueError, match=f"default {quantity} out of the limits"): | |
| with pytest.raises(ValueError, match=f"default {quantity} out of the limits"): |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Isaac Lab Review Bot
Reviewed the test-pruning backport, including the sole core runtime change in transform_to_vec_quat, the deferred OvPhysX mock import, test relocations, documentation references, skip-list cleanup, and package fragments. The proposed zero-dimensional-array finding does not establish a contract regression: the API documents 1D–3D inputs and only promises the new ValueError for ranks above three.
- Design and architecture: The patch primarily consolidates test coverage. Traced architecture checks show renderer/physics ownership assertions and
PhysicsManagerlifecycle coverage were relocated into surviving suites rather than changing production dependency direction. - API: For supported 1D–3D transform arrays,
transform_to_vec_quatretains its return shapes and dtypes. The added pre-view guard makes 4D input raise the newly documentedValueError. Zero-dimensional input remains outside the documented input shapes and previously had no stable exception contract. - Implementation: The removed test skip entries correspond to deleted test files, and the updated contributing and ray-caster command examples reference surviving paths. The OvPhysX fixture preserves
MockOvPhysxBindingSetconstruction while deferring optional runtime imports. Residual risk is concentrated in the breadth lost through large-scale test consolidation, particularly where checks now rely on shared contract tests rather than dedicated cases.
No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.
The full PR diff was reviewed; some supplemental surrounding file context was omitted.
Automated review; human maintainers own approval decisions.
Backports the two test-prune PRs whose automatic backports failed to
release/3.0.0:isaaclabtests with the test-audit skill (core job 32:18 → ~22:40 locally). The bot could not replay it because the PR contained a merge commit.Each is a
git cherry-pick -xof the squash commit ondevelop:release/3.0.0already has in [Tests] Prune core isaaclab tests with the test-audit skill #8022's final form.Test-only changes plus
.skipchangelog fragments. Tests are validated by this PR's CI.The rest of this test-audit series is already on
release/3.0.0: