Skip to content

Support graph-YAML environments in typed YAML Experiments - #970

Merged
alexmillane merged 10 commits into
mainfrom
alex/feature/support_yaml_environments_on_osmo
Aug 3, 2026
Merged

Support graph-YAML environments in typed YAML Experiments#970
alexmillane merged 10 commits into
mainfrom
alex/feature/support_yaml_environments_on_osmo

Conversation

@alexmillane

@alexmillane alexmillane commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Run graph-YAML environments with experiment_runner.py.

Detailed description

  • Before: Typed YAML Experiments could only select registered environment names, so graph-spec YAML environments (e.g. the robolab tasks) were reachable only through the legacy JSON format.
  • Now: An environment.type ending in .yaml/.yml now routes through the same LegacyGraphEnvironmentCfg compatibility path the JSON frontend uses.
  • osmo/submit_arena_experiment.py embeds the experiment in the OSMO yaml by re-serializing it.

The typed YAML experiment frontend previously resolved environment.type
only against registered environment names; graph-spec YAML environments
(e.g. the robolab tasks) were reachable only through the legacy JSON
format or the CLI. An environment.type ending in .yaml/.yml now routes
through the same LegacyGraphEnvironmentCfg compatibility path the JSON
frontend uses, and the camera pre-launch guard recognizes such runs.

Signed-off-by: Alex Millane <amillane@nvidia.com>
language_instruction is not a flag on the graph-environment parser (it is
injected from the typed builder config after parsing, as is device), so
rendering it as a token made argparse swallow the value as the
example-environment positional.

Signed-off-by: Alex Millane <amillane@nvidia.com>
osmo/submit_arena_experiment.py embeds the effective Experiment by
re-serializing it, which failed for graph-YAML environments because the
serializer only resolves registry-registered configs. The compatibility
config now records its graph-spec path and source environment values,
and the serializer emits them as the environment section.

Graph runs also now execute with the Run's typed environment_builder
config instead of one re-derived from CLI tokens, so post-load Hydra
overrides (e.g. environment_builder.num_envs on an OSMO submission)
take effect; tokens carry only environment values.

Signed-off-by: Alex Millane <amillane@nvidia.com>
@alexmillane
alexmillane force-pushed the alex/feature/support_yaml_environments_on_osmo branch from c4c0125 to eb420ac Compare July 29, 2026 14:04

@alexmillane alexmillane left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Self review 1

Comment thread isaaclab_arena/evaluation/arena_experiment_config_loader.py Outdated
Comment thread isaaclab_arena/evaluation/experiment_runner.py Outdated
Comment thread isaaclab_arena/hydra/typed_experiment_loader.py Outdated

@alexmillane alexmillane left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Self review 2

Comment thread isaaclab_arena/evaluation/legacy_graph_environment_cli.py Outdated
Comment thread isaaclab_arena/hydra/typed_experiment_loader.py Outdated
Comment thread isaaclab_arena/hydra/typed_experiment_loader.py Outdated
Comment thread isaaclab_arena/hydra/typed_experiment_serializer.py Outdated
Comment thread isaaclab_arena/hydra/typed_experiment_serializer.py Outdated
Comment thread isaaclab_arena/hydra/typed_experiment_serializer.py Outdated

@alexmillane alexmillane left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

self review 3

Comment thread isaaclab_arena/hydra/typed_experiment_loader.py Outdated
Comment thread isaaclab_arena/hydra/typed_experiment_serializer.py Outdated
@cvolkcvolk

Copy link
Copy Markdown
Collaborator

/review

Comment thread isaaclab_arena/hydra/typed_experiment_loader.py
Comment thread isaaclab_arena/hydra/typed_experiment_loader.py
Comment thread isaaclab_arena/evaluation/legacy_graph_environment_cli.py
@arena-review-bot

arena-review-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🤖 Isaac Lab-Arena Review Bot

Summary

This routes an environment.type ending in .yaml/.yml through the existing LegacyGraphEnvironmentCfg compatibility path so graph-spec YAML environments can run from typed YAML Experiments (and embed into OSMO submissions). The refactor is clean and well-tested — the builder config now crosses the boundary typed instead of round-tripping through the argparse namespace, and the load/serialize round-trip is covered. A few points below are worth a look before merge.

Findings

🟡 enable_cameras stored twice (typed_experiment_loader.py:254) — kept as the typed field and inside per_run_overrides. Cameras are spawned from CLI tokens built off per_run_overrides, but a Hydra override of the typed enable_cameras field wouldn't reach those tokens, so AppLauncher would enable cameras while the env is built without them — silently. Suggest deriving the CLI value from the typed field.

🟡 Run names swapped (robolab_2_tasks_pi0.yaml:13) — banana_on_plate_pi0 selects banana_in_bowl.yaml and vice-versa; both files exist, so each Run runs the other task.

🟡 Literalstr widening (gr00t_remote_closedloop_policy.py:57) — drops the enforced chunk/synced_batch set into a docstring. If this was to get the field through OmegaConf, a str-based Enum round-trips and keeps the constraint.

🔵 Stale header comment (robolab_2_tasks_pi0.yaml:6) — mentions running the GR00T policy / a GR00T server, but both Runs use the pi0 policy.

Test Coverage

Good — load, serialize-and-reload round-trip, the pre-startup camera assertion, the OSMO embed handoff, and the legacy JSON path are all covered. These are pure-config paths, so no SimulationApp inner/outer tests are needed.

Verdict

Minor fixes needed

@alexmillane
alexmillane marked this pull request as ready for review August 3, 2026 12:17
@greptile-apps

greptile-apps Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR allows typed Experiment YAML files to select graph-spec YAML environments, preserves those environments through serialization and OSMO embedding, and executes them through the legacy graph-construction adapter.

  • Adds structured graph path and per-Run override storage.
  • Routes graph YAML environments through typed loading, execution, and serialization.
  • Adds loader, execution-adapter, and OSMO workflow coverage.
  • Adds a two-task Robolab Pi0 experiment configuration.

Confidence Score: 4/5

The swapped Robolab graph paths should be corrected before merging because both new runs currently execute and report results for the opposite task.

The graph-YAML loading path is coherently connected through execution and serialization, but the newly added example maps each named Run to the other task’s graph, producing incorrectly attributed evaluations.

Files Needing Attention: isaaclab_arena_environments/robolab/experiment_configs/robolab_2_tasks_pi0.yaml

Important Files Changed

Filename Overview
isaaclab_arena/hydra/typed_experiment_loader.py Detects YAML graph selectors and stores their path and environment overrides in the compatibility config.
isaaclab_arena/evaluation/legacy_graph_environment_cli.py Reconstructs graph override arguments while passing the typed builder configuration directly to ArenaEnvBuilder.
isaaclab_arena/hydra/typed_experiment_serializer.py Serializes graph compatibility configs back into reloadable typed Experiment environment sections.
isaaclab_arena/evaluation/run_execution.py Passes the complete typed environment-builder configuration into graph environment construction.
isaaclab_arena_environments/robolab/experiment_configs/robolab_2_tasks_pi0.yaml Adds two Pi0 Robolab runs, but their graph-spec paths are swapped relative to their Run names.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Typed Experiment YAML] --> B{environment.type ends in YAML?}
  B -- No --> C[Registered typed environment config]
  B -- Yes --> D[LegacyGraphEnvironmentCfg]
  D --> E[Reconstruct graph CLI overrides]
  E --> F[Load graph spec]
  C --> G[ArenaEnvBuilder]
  F --> G
  G --> H[Experiment rollout]
  D --> I[Serialize effective Experiment]
  I --> J[OSMO embedded Experiment YAML]
Loading

Reviews (1): Last reviewed commit: "Remvoe yaml tag." | Re-trigger Greptile

Comment thread isaaclab_arena_environments/robolab/experiment_configs/robolab_2_tasks_pi0.yaml Outdated
Comment thread isaaclab_arena_environments/robolab/experiment_configs/robolab_2_tasks_pi0.yaml Outdated
Comment thread isaaclab_arena_environments/robolab/experiment_configs/robolab_2_tasks_pi0.yaml Outdated
Comment thread isaaclab_arena_gr00t/policy/gr00t_remote_closedloop_policy.py
Comment thread isaaclab_arena/hydra/typed_experiment_loader.py
@alexmillane
alexmillane enabled auto-merge (squash) August 3, 2026 13:26
@alexmillane
alexmillane merged commit ddc8729 into main Aug 3, 2026
19 of 20 checks passed
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