Repository navigation
Fix OSMO experiment output collector: timings format and Run timeouts - #1426
david-tingdahl-nvidia merged 4 commits into
Conversation
97188be to
8dd4c17
Compare
🤖 Isaac Lab-Arena Review BotSummaryThis PR fixes two problems in the OSMO Experiment output collector. Per-Run timings now go to Findings🔵 Improvement: VerdictShip it |
|
cvolkcvolk
left a comment
There was a problem hiding this comment.
Thanks! Suggestion to catch regressions on the runner and collector drifting apart. (see #1388)
abb4f31 to
4d91271
Compare
…ctor OSMO marks a group that exceeds exec_timeout as FAILED_EXEC_TIMEOUT and cascades FAILED_UPSTREAM to the Experiment output collector, so one hung Run discarded the whole Experiment output. Bound each Experiment Runner with GNU timeout at the group exec_timeout minus a 30 minute margin, so a timed-out Run is recorded as failed (exit code 124/137) and the task still succeeds, like any other Run failure. Signed-off-by: David Tingdahl <[email protected]>
The per-Run timings (a list) and the Experiment timings ({totals, runs}) shared
one filename. The collector copied the runner's Experiment file over the Run's
own file, so aggregate_experiment_timings read an object where it expects a
list. Split the constant into ARENA_RUN_TIMINGS_FILENAME (arena_run_timings.json)
and ARENA_AGGREGATED_TIMINGS_FILENAME (arena_experiment_timings.json, unchanged),
and drop the collector's copy, since copytree already brings the per-Run file.
Make the test fixture use the real runner layout.
Signed-off-by: David Tingdahl <[email protected]>
Signed-off-by: David Tingdahl <[email protected]>
Assert each completed Run directory holds its timings file before copying, and write test fixtures with the production timing writers. Verify the collected per-Run timings are a list identical to the source, and that a missing per-Run file is reported with its path. Adapted from #1388. Signed-off-by: David Tingdahl <[email protected]>
4d91271 to
70c0a21
Compare
Spawn each `RigidObjectSet` member from its own spawn configuration through Isaac Lab's `MultiAssetSpawnerCfg`, so members keep their scale and the physics settings, USD variant selections and materials set in their spawn configurations. This is the second step toward choosing an object's asset through a variation, after #1430. ## Why this change? We plan to let experiments choose which registered asset a scene object spawns with, the way they already vary lighting, camera pose or mass. This will be a build-time variation, `AssetSelectionVariation`: for an object such as `pickup` it picks one of several registered assets, for example a cracker box or a sugar box, for each environment. Each chosen asset must spawn exactly as registered, with its own scale and physics settings. Isaac Lab supports this natively: `MultiAssetSpawnerCfg` spawns every entry from its own spawn configuration. `RigidObjectSet` does not use it yet. It spawns a `MultiUsdFileCfg`, which gives all members one configuration, so members lose the physics settings, USD variant selections and visual materials set in their spawn configurations, and Arena writes rescaled copies of member USD files to keep their scale. Materials authored in the USD files were already kept. This PR switches `RigidObjectSet` to `MultiAssetSpawnerCfg`. It keeps one step that Isaac Lab does not cover: Isaac Lab finds a rigid object's body through one path for all environments, so members whose bodies sit at different paths get a cached copy with the body moved to a common path. `AssetSelectionVariation` will use both: `MultiAssetSpawnerCfg` to spawn the assets chosen for the environments, and `align_rigid_body_paths` to give them a common body path. ## What changes? - `align_rigid_body_paths(spawn_cfgs)` (`utils/usd/rigid_body_path_alignment.py`) returns copies of the spawn configurations with their rigid bodies at one path. If the paths already agree, the copies are unchanged and nothing is written. Otherwise every member must be a USD asset, and each gets a cached `rigid_<sha256>.usd` copy with its body at `/rigid_body`, its materials kept and its USD variant selections baked in. Settings that name prims inside the asset, such as `prim_physics` or `visual_material_bindings`, are rejected in that case. - `RigidObjectSet` spawns the aligned copies: one member as a plain config, more members as a `MultiAssetSpawnerCfg`. Members may be primitive shapes when their body paths agree. - Per-environment assignment is unchanged: `assign_variants()` still expands the spawn entries to one per environment. This expansion is transitional. The next PR pins assignments through Isaac Lab's clone strategy. - `object_set_utils.py`, the old rescale-and-rename cache, and its tests are deleted. - The file-based `find_shallowest_rigid_body` is deleted, because its last production caller was the old set code. Its tests use `find_shallowest_rigid_body_from_stage` instead. Effect on existing code: - The physics settings, USD variant selections and visual materials set in members' spawn configurations now reach the spawned set. The YCB members share a body path and spawn their own files. `sweet_potato` and `jug` keep their rigid body at different paths, so they spawn copies with the body moved to `/rigid_body`, with their scales kept on the spawn config instead of baked into the file. - `member_usd_paths` and `object_usd_paths` are removed. A set with several members exposes its spawn entries as `object_cfg.spawn.assets_cfg`: one per member, or one per environment after `assign_variants()`. A one-member set spawns the member's own config at `object_cfg.spawn`. Callers in the repo are updated. - Configure members before building the set. Per-environment assignment rebuilds the entries in `object_cfg.spawn.assets_cfg` from the members, so edits to single entries do not survive it. Set-wide settings on `object_cfg.spawn` do. - A set-level `scale` or `spawn_cfg_addon` is rejected, and a set-level `asset_cfg_addon` now applies, as for `Object`. No caller passes any of them. - A copy with the body moved drops an authored root translation and rotation, as Isaac Lab's spawn does. For `computer_mouse_hot3d_robolab`, this swaps two bounds axes compared with #1430's bounds, which keep the rotation (follow-up: #1430's bounds will drop the authored root rotation too). ## Usage example Before (the set kept only each member's USD path and scale): ```python sugar_box.object_cfg.spawn.mass_props = sim_utils.MassPropertiesCfg(mass=0.3) pickup_object = RigidObjectSet(name="pickup", objects=[cracker_box, sugar_box]) pickup_object.object_cfg.spawn.mass_props # None: one MultiUsdFileCfg for both members, the mass is dropped ``` After: ```python sugar_box.object_cfg.spawn.mass_props = sim_utils.MassPropertiesCfg(mass=0.3) pickup_object = RigidObjectSet(name="pickup", objects=[cracker_box, sugar_box]) pickup_object.object_cfg.spawn.assets_cfg[1].mass_props.mass # 0.3 ``` ## Validation - `pre-commit run --all-files` passes. - Test phases in the Arena container: Phase 1 1488 passed and 3 failed, Phase 2 27 passed, Phase 3 64 passed and 2 failed. The 5 failures are the same as on main and #1430: four need the optional tetrahedralization dependency (`pytetwild`), and the multi-env mimic test hits its 900 s timeout. The review GUI tests give 45 passed and 1 failed (`test_run_sim_preview_via_simapp_subprocess`), which fails the same way on #1430's head. - Library check over all 173 registered rigid assets: contact paths are unchanged, and the YCB members already share a body path, so their set spawns the original files and writes no copies. Moving the rigid body of every registered rigid USD asset into a copy: 169 keep their bounds, 1 changes (the rotated mouse above), none are rejected. - The full phases ran on cde46e2. The commits after it were checked with the affected test files. - At 5e01c88, which included main with #1427 and #1426 and the final #1430, before the branch was rebased onto main after #1430 merged (the rebased head aa9b074 has identical files): the object-set, body-path alignment, geometry, environment-graph and clutter tests pass (80 passed), the heterogeneous placement and rigid-body tests pass (35), the camera test passes, and the review GUI tests pass apart from the known `test_run_sim_preview_via_simapp_subprocess` (45 passed). #1427's placement tests passed after the main merge (16 and 51). The library check gives the same result as above. - After the rename of the module to `rigid_body_path_alignment.py` (7941495), its tests and the object-set tests pass (45 passed). - A relation-free set with a fixed pose still blocks placement, as on main (eafbb63). Set, collision and placement tests pass (50 and 46). - New tests were checked to fail when the behaviour they guard is removed: clearing the root translation and rotation before the body is moved, de-instancing before body discovery, and keeping path-keyed settings when the body paths already match. --------- Signed-off-by: Clemens Volk <[email protected]>
Fixes for the OSMO Experiment output collector:
Why this change?
Two bugs made one bad Run discard the whole Experiment output:
Per-Run timings (a list) and the Experiment timings (
{totals, runs}) shared the same filename:arena_experiment_timings.jsonwhich caused incompatibility during reads.OSMO marks a group that exceeds
exec_timeoutasFAILED_EXEC_TIMEOUTand cascadesFAILED_UPSTREAMto the collector. One hung Run therefore lost the output of every other Run.What changes?
ARENA_RUN_TIMINGS_FILENAMEinto a separate one for the aggregated stats.copytreealready brings each Run's own file.timeoutat the groupexec_timeoutminus a 30 minute margin. A timed-out Run is recorded as a failed Run but let the OSMO task succeeds. This is similar to how we currently handle general failures in tasks.Validation