Skip to content

Fix OSMO experiment output collector: timings format and Run timeouts - #1426

Merged
david-tingdahl-nvidia merged 4 commits into
mainfrom
dtingdahl/fix/osmo-collector-timings-and-timeouts
Oct 13, 2026
Merged

david-tingdahl-nvidia merged 4 commits into
mainfrom
dtingdahl/fix/osmo-collector-timings-and-timeouts

Conversation

@david-tingdahl-nvidia

@david-tingdahl-nvidia david-tingdahl-nvidia commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes for the OSMO Experiment output collector:

  • Timings filename collision
  • Collector failure on job timeout.

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.json which caused incompatibility during reads.

  • OSMO marks a group that exceeds exec_timeout as FAILED_EXEC_TIMEOUT and cascades FAILED_UPSTREAM to the collector. One hung Run therefore lost the output of every other Run.

What changes?

  • Split the filename constant ARENA_RUN_TIMINGS_FILENAME into a separate one for the aggregated stats.
  • Remove the collector's timings copy. copytree already brings each Run's own file.
  • Each Experiment Runner is bounded with GNU timeout at the group exec_timeout minus 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

  • Verified dummy job in a live OSMO cluster.

@david-tingdahl-nvidia
david-tingdahl-nvidia force-pushed the dtingdahl/fix/osmo-collector-timings-and-timeouts branch from 97188be to 8dd4c17 Compare October 9, 2026 10:30
Comment thread osmo/tasks/experiment_runner_task.py Resolved
@arena-review-bot

Copy link
Copy Markdown
Contributor

🤖 Isaac Lab-Arena Review Bot

Summary

This PR fixes two problems in the OSMO Experiment output collector. Per-Run timings now go to arena_run_timings.json, so they no longer share a filename with the aggregated arena_experiment_timings.json, and the collector's extra copy is removed because copytree already brings the per-Run file. Each Experiment Runner is also wrapped in GNU timeout, set to the group exec_timeout minus 30 minutes. A Run that hangs is now recorded as a failed Run (exit 124/137) instead of OSMO cascading FAILED_UPSTREAM to the collector. Both fixes look correct. No code still uses the old constant name, and the timeout margin matches OSMO 6.3's per-group exec_timeout.

Findings

🔵 Improvement: osmo/tasks/experiment_runner_task.py:61: timeout_seconds is optional, but the only production caller always passes it. Could it be required, so the no-timeout branch and its test can be removed? (inline)

Verdict

Ship it

@greptile-apps

greptile-apps Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium impact] Refactors experiment timing file names and adds run timeouts.

The PR appears safe to merge, with a non-blocking request to test the timeout path by executing it.

Findings

  1. P2 Timeout behavior goes untested ▶

Summary

This PR separates per-Run timing files from combined Experiment timings and adds a time limit to each OSMO runner.

  • Run timers and Experiment totals use separate files.
  • Each Run stops before its OSMO group timeout.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Run group] --> B[Runner with time limit]
  B --> C{Runner exit code}
  C -->|Zero| D[Record completed Run]
  C -->|Nonzero| E[Record failed Run]
  D --> F[Shell exits successfully]
  E --> F
  F --> G[Experiment collector]
  G --> H[Copy completed Run directories]
  G --> I[Keep failed Run results]
  H --> J[Combine completed Run timings]
  I --> K[Write Experiment report]
  J --> K
Loading

Reviews (1) · Last reviewed commit: "Rename ARENA_RUN_TIMINGS_FILENAME to ARE..." · Reviewed by Greptile

@cvolkcvolk cvolkcvolk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks! Suggestion to catch regressions on the runner and collector drifting apart. (see #1388)

@david-tingdahl-nvidia
david-tingdahl-nvidia force-pushed the dtingdahl/fix/osmo-collector-timings-and-timeouts branch from abb4f31 to 4d91271 Compare October 12, 2026 11:56
@david-tingdahl-nvidia
david-tingdahl-nvidia enabled auto-merge (squash) October 13, 2026 06:54
…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]>
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]>
@david-tingdahl-nvidia
david-tingdahl-nvidia force-pushed the dtingdahl/fix/osmo-collector-timings-and-timeouts branch from 4d91271 to 70c0a21 Compare October 13, 2026 06:56
@david-tingdahl-nvidia
david-tingdahl-nvidia merged commit 4be2c00 into main Oct 13, 2026
12 checks passed
cvolkcvolk added a commit that referenced this pull request Oct 15, 2026
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants