Repository navigation
[Newton] Redesign Newton Manager [4/N] - #8926
Conversation
edcdeec to
ba22e57
Compare
maxkra15
left a comment
There was a problem hiding this comment.
The mask reset plumbing looks good from this pass. 72 focused checks passed across actuators, buffers, processors and bias noise, including the actuator tests on CUDA. Left two optional performance suggestions inline, mainly for when 5/N starts calling these resets every step. No correctness blocker found in this review; Kit-only paths weren't run.
ba22e57 to
9e909b9
Compare
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Scope and over-engineering (2), Compatibility and deprecation (7), Style consistency (3), Test quality (2). Other reviewed categories look good.
- PR description: Narrow the no-sync claim to warmed device-mask paths; benchmark full-batch reset latency using baseline/candidate revisions, command/workload, hardware, backend, environment count, warmup, and metric, while retaining the reported per-file validation and template sections.
- Design and architecture: Architecture looks good.
- Scope and over-engineering: Minimal implementation: extend InteractiveScene, ActuatorCollection, backend reset hooks, and existing buffer, processor, noise, and ray-caster owners; remove the aggregate entity tuple and discarded drift allocations, then forward masks directly while retaining compatibility bridges. No source modules were added; existing modules retain their responsibilities. Scope is cohesive; no split recommended.
- API: API changes look good.
- Compatibility and deprecation: Breaking changes: removed InteractiveSceneWarp, renamed SurfaceGripper.indices, expanded custom reset hooks, and altered seeded index-reset sampling lack complete transitions; retain functional legacy paths, targeted warnings, migration and removal guidance, and transition coverage.
- Implementation: Implementation looks good.
- Style consistency: Changed void reset methods omit required return annotations; add -> None consistently.
- Test quality: The added CPU DelayBuffer regression passes the old implementation and misses the distinguishing synchronization behavior; replace it with a CUDA masked-reset check that rejects synchronization.
Significant concerns. Posted 14 inline findings.
Automated review; human maintainers own approval decisions.
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Scope and over-engineering (3), Compatibility and deprecation (4), Style consistency (4), Test quality (3). Other reviewed categories look good.
- PR description: Qualify the universal synchronization claim; supply reproducible baseline/candidate reset-latency measurements with revisions, command/workload, hardware, backend, environment count, mask density, warmup, and runtime environment.
- Design and architecture: Architecture looks good.
- Scope and over-engineering: Minimal implementation: extend InteractiveScene, ActuatorCollection, DelayBuffer, processor/noise owners, and backend/contrib resets; no source modules were added. Collapse duplicate actuator traversal, avoid the scene entity tuple, and allocate zero ray-cast drift only when sampling is disabled. Keep selector forwarding, selected-state updates, and preallocated Newton per-DOF masks. Scope is cohesive; no split recommended.
- API: API changes look good.
- Compatibility and deprecation: Breaking changes: InteractiveSceneWarp imports, SurfaceGripper.reset(indices=...), and legacy entity/actuator overrides lose support without complete deprecation bridges; retain functional old contracts with targeted warnings, migration/removal guidance, and transition coverage.
- Implementation: Implementation looks good.
- Style consistency: The changelog incorrectly groups DelayBuffer.reset under added env_mask parameters; describe its Torch boolean batch_ids contract separately.
- Test quality: The processor reset test derives every expectation from another instance of the tested processor, allowing shared computation errors to pass; replace that oracle with hand-computed reset and continued-history values.
Significant concerns. Posted 14 inline findings.
Automated review; human maintainers own approval decisions.
[High impact] The mask reset path reaches shared scene and stateful reset workflows across multiple physics backends. The PR appears safe to merge, with a non-blocking cleanup needed for the deleted scene class’s API docs. Findings
SummaryThis PR carries boolean reset masks through scenes, assets, actuators, buffers, and stateful processors.
Intentional breaking changes acknowledged by Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["InteractiveScene.reset(env_mask)"] --> B["Assets and sensors"]
B --> C["ActuatorCollection.reset"]
C --> D["Torch actuator groups"]
C --> E["Backend-native actuators"]
E --> F["Build per-DOF masks"]
F --> G["Reset both state buffers"]
B --> H["Wrench composers and sensor buffers"]
Reviews (1) · Last reviewed commit: "Skip stateless Newton actuators in maske..." · Reviewed by Greptile |
|
run-ci |
Assets, actuators, the Newton actuator adapter, delay buffers, stateful tensor processors and bias noise models take env_mask and reset only the selected environments without synchronizing the device. The scene passes env_ids and env_mask to every asset and sensor, so masked resets no longer reset the actuator state and external wrenches of every environment. InteractiveSceneWarp is removed.
753c30b to
ba998c1
Compare
|
run-ci |
|
run-ci |
Description
Part 4 of the Newton manager redesign (overview).
Builds on [2c-ii/N] #8870 (merged), which made the backend reset flags mask-only. The env/MDP layer is [5/N] #8927.
Everything below the managers resets from a boolean device mask. A masked reset changes only the selected
environments and does not synchronize the device, so [5/N] can reset on the reset mask every step.
Assets and scene
AssetBase.reset(env_ids=None, env_mask=None)matches the sensor signature onmain. Every asset honorsenv_mask(awp.boolarray of shape(num_envs,)), and it takes precedence overenv_ids.InteractiveScene.reset(env_ids=None, env_mask=None)passes both to every asset and sensor.main, a reset with onlyenv_maskreset the actuator state of every environment (Newton, PhysX, OVarticulations), and the external wrenches of every environment (Newton and PhysX rigid objects and collections).
SurfaceGripper.resettakesenv_idsandenv_maskinstead ofindices.InteractiveSceneWarpis removed. The base scene now resets every entity from the mask, and theoverride passed indices to the sensors.
Actuators
ActuatorBase.reset(env_ids=None, env_mask=None);ActuatorCollection.resetforwards the mask to every groupand to the backend-native actuators.
DelayedPDActuatordraws a delay for every environment and keeps the selected ones; the actuator nets clear themasked history.
NewtonActuatorAdapter.reset(env_mask=...)builds the per-DOF masks of stateful actuators into preallocatedarrays and skips stateless ones.
ThrusterandMultirotorresample and reset the masked environments.Buffers and processors
DelayBuffer.resettakes a boolean mask and redraws sampled lags withtorch.where.TensorProcessor.reset,DigitalFilter,Integrator,NoiseModelandNoiseModelWithAdditiveBiastakeenv_mask.nonzero().Breaking: custom subclasses of
AssetBase,ActuatorBase,TensorProcessorandNoiseModelmust acceptenv_maskand leave unselected environments unchanged.Testing
Targeted tests pass, run file by file: actuator collection and Newton adapter (masked reset; the collection test
runs under
torch.cuda.set_sync_debug_mode("error")), delay buffer, tensor processors, noise, Newtonarticulation, rigid object, cable, Newton actuators, Newton ray caster, articulation and rigid object contracts
(
-k newton), and the experimental frontend. Kit-only tests not run locally: interactive scene, ray castersensor, sensor base, thruster, PhysX/OV assets.
Checklist
pre-commitchecks with./isaaclab.sh --format