Skip to content

Run an Experiment from the command line without a YAML file - #1737

Merged
cvolkcvolk merged 17 commits into
mainfrom
cvolk/feature/experiment-command-line-runs
Dec 2, 2026
Merged

cvolkcvolk merged 17 commits into
mainfrom
cvolk/feature/experiment-command-line-runs

Conversation

@cvolkcvolk

@cvolkcvolk cvolkcvolk commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Let experiment_runner.py run an Experiment given only on the command line, and let an override change a Run's environment or policy type.

Why this change?

Every run except the smoke test needed a checked-in Experiment YAML file, and an override could not change a Run's environment.type or policy.type. policy_runner.py runs without a file, so this closes one of the gaps before it can be retired.

What changes?

Overrides change the Experiment the same way editing its YAML file would. Without --experiment_config, they start from an empty Experiment.

Run without a file:

python isaaclab_arena/evaluation/experiment_runner.py \
  runs.quick.environment.type=kitchen_pick_and_place \
  runs.quick.policy.type=zero_action \
  runs.quick.rollout_limit.num_steps=50

Change a Run's environment in a file:

python isaaclab_arena/evaluation/experiment_runner.py \
  --experiment_config isaaclab_arena_environments/experiment_configs/getting_started_experiment.yaml \
  runs.baseline.environment.type=kitchen_pick_and_place \
  runs.baseline.environment.object=mustard_bottle

An Experiment given on the command line is named <timestamp>_experiment unless name= is set. The full override rules are on the Experiments concept page.

Changes to existing behavior:

  • experiment_runner.py without a file and without overrides no longer runs a smoke test; it stops with an error. The install check in the README and the installation page passes its Run on the command line, and smoke_test_experiment.yaml is removed.
  • A Run whose environment.type or policy.type differs from shared no longer inherits that shared section. Fields both types have, such as embodiment, must be set in the Run.
  • A mapping override replaces the mapping instead of merging into it, and extend_list(...) is rejected.
  • A variation written as a dotted key in one place and nested in another now fails. Before, one of the two values was silently ignored.

In the code, read_untyped_experiment in the new isaaclab_arena/hydra/untyped_experiment.py reads the file and applies the overrides before Isaac Sim starts, and build_typed_experiment builds the typed configs from that untyped Experiment. #1730 changes a parameter of build_typed_experiment; whichever PR merges second adapts it.

Validation

  • The other 56 checked-in Experiment files give the same typed configs as on main.
  • Ran the new install check command end to end. Run smoke_test completed.
  • Ran the no-file example above end to end in the Arena Docker image. Run quick completed, and the Experiment was named 2026-11-30_10-34-00_experiment.
  • An OSMO --dry_run with an experiment_cfg.* override renders the workflow with the new value in that Run only.

@cvolkcvolk
cvolkcvolk marked this pull request as ready for review November 23, 2026 13:13
@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes affect how Experiment values are built for local runs and OSMO submissions.

Restore Experiment-wide references before merging; whole-mapping Run checks also need tightening.

Findings

  1. P1 Experiment-wide references stop working ▶
  2. P2 Whole mappings skip name checks ▶

Summary

The PR applies overrides before building typed Runs and allows local Experiments without a YAML file.

  • Experiment overrides edit its values before typed Runs are built.
  • The runner accepts a whole Experiment from command-line overrides.
  • OSMO submissions send Experiment overrides through the Experiment loader.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  File[Optional Experiment YAML] --> Mapping[Experiment mapping]
  CLI[Command-line overrides] --> Mapping
  Mapping --> Shared[Merge shared values into each Run]
  Shared --> Cameras[Read camera needs before startup]
  Shared --> Typed[Build typed Runs]
  Typed --> Experiment[Build Experiment directly]
  Experiment --> Local[Execute locally]
  Experiment --> OSMO[Compose OSMO submission]
Loading

Reviews (1) · Last reviewed commit: "Fix override wording in docs, help and s..." · Reviewed by Greptile

@arena-review-bot

Copy link
Copy Markdown
Contributor

🤖 Isaac Lab-Arena Review Bot

Summary

This PR applies every Experiment override to the plain Experiment mapping before typed Runs are built. That lets experiment_runner.py run an Experiment given only on the command line, and lets an override change a Run's type. One rule is easier to explain than the old split between shared overrides and Run overrides. The catch is that OmegaConf.update creates any path without complaint, so two cases that used to fail loudly or merge predictably now silently change what gets evaluated.

Design, Boundaries & Scope

The new rule that a Run with a different type does not inherit that shared section changes how existing Experiment files load, not only command-line overrides. A Run that picks another environment type now drops shared fields that both types accept, such as embodiment and enable_cameras, and nothing reports it. None of the 48 checked-in files are affected; I scanned them. User files with mixed types, though, will evaluate a different config with no error. Details are inline at typed_experiment_loader.py:282. The author's thread on concept_arena_experiments.rst:234 is about the same rule.

Findings

🔴 Critical: isaaclab_arena/hydra/experiment_overrides.py:63: Overrides of variations that a file writes as flat dotted keys are silently ignored.

  • Example: runs.swap_objects.variations.pick_up_object.asset_selection.enabled=false.
  • The override is added as a nested duplicate of the flat key. When overrides_from_dict flattens the variations, the file's true comes last and wins.
  • On main this failed loudly. I checked the shared form against main's code; the runs.<name> form I reproduced with stand-in dataclasses.
  • Fix: expand dotted variations keys into nested mappings when the file is read.

🟡 Warning: isaaclab_arena/hydra/typed_experiment_loader.py:282: The different-type rule silently drops shared fields that both types accept. Could we print the fields a Run doesn't inherit, and add this change to the migration guide?

🔵 Improvement: isaaclab_arena/hydra/typed_experiment_loader.py:158: _section_replacement_hint also counts fields that the same command set. It can then attach a "replace the whole environment section" hint to an error that is in policy. Consider dropping the hint together with find_key_paths_set_by_overrides.

Already raised, not repeated here:

  • Greptile's thread on Experiment-wide interpolations.
  • Greptile's thread on whole-runs assignments skipping the Run name check.
  • The author's comments on resolve_experiment_config_path and on the docs wording.

One more case for the interpolation thread: a name: ${oc.env:...} written in the file is no longer resolved either. Main resolved it in _read_experiment_name_from_yaml_or_stem. I checked both branches.

Test Coverage and CI Cost

  • The new with_subprocess test adds one more Isaac Sim launch. An existing end-to-end test could cover the same path (inline at test_experiment_runner.py:181).
  • No test overrides a dotted variation key. A loader-level test that doesn't need the simulator would catch the 🔴 above.
  • At this head, the CI test jobs show as skipped or queued, so I couldn't confirm the new tests pass.

Verdict

Significant concerns

@cvolkcvolk
cvolkcvolk force-pushed the cvolk/feature/experiment-command-line-runs branch 3 times, most recently from d4eaac5 to 2609441 Compare November 27, 2026 16:45
@cvolkcvolk cvolkcvolk changed the title Run an Experiment from command-line overrides alone Run an Experiment from the command line without a YAML file Nov 27, 2026
@cvolkcvolk

Copy link
Copy Markdown
Collaborator Author

/review

@arena-review-bot

Copy link
Copy Markdown
Contributor

The review did not return a complete result. Please run /review to retry.

Requested in this comment.

@cvolkcvolk

Copy link
Copy Markdown
Collaborator Author

/review

@arena-review-bot

Copy link
Copy Markdown
Contributor

The review did not return a complete result. Please run /review to retry.

Requested in this comment.

@cvolkcvolk
cvolkcvolk force-pushed the cvolk/feature/experiment-command-line-runs branch from a4cdf9e to d82883e Compare November 30, 2026 16:26
experiment_runner.py applied Run overrides after each Run was built
into typed configs. So an override could not change a Run's type or
add a Run, and every run except the smoke test needed a checked-in
YAML file.

read_experiment_values in isaaclab_arena/hydra/experiment_values.py
now reads the Experiment file, or nothing, and applies the overrides
to those plain values as an edit of the file would. It merges shared
into each Run and checks the result before Isaac Sim starts.
build_typed_experiment builds the typed configs from those values.

Without --experiment_config, the overrides are the whole Experiment,
named <timestamp>_experiment unless name= is set. With a file,
overrides cannot add a Run. A Run whose environment or policy type
differs from shared does not inherit that shared section. A variation
written both as a dotted key and nested is rejected, because the file
value used to win silently. The runner reads the Experiment once, and
OSMO submission applies experiment_cfg.* overrides the same way.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
Add the no-file form and the override rules to the Experiments
concept page, and point the quickstart and the run-experiment skill
to them. The install checks pass --experiment_config, because without
a file the overrides are the whole Experiment. Overrides no longer
need a leading +, so the variation pages drop it. The variations page
says that an override cannot change an entry the file writes as a
dotted key.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
"The overrides are the whole Experiment" read like a separate mode.
Describe the no-file form the same way as the file form: overrides
change the Experiment as an edit of its YAML file would, and without
a file they start from an empty Experiment.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
read_experiment_values mixed reading, overriding, several kinds of
checks and naming in one long function, and the checks of a merged
Run were split across two places. It now reads as a list of named
steps, each rule lives in one function, and the functions appear in
the order the steps run. _shared_values_inherited_by_run holds the
inheritance rules for rollout_limit and for a different type.

Each Run is now checked in one loop, including its types. A failed
shared merge is reported once, naming the Run and the Experiment, and
an empty or non-string Run name gets the same message as any other
invalid name.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
RUN_FIELDS_REPLACING_SHARED held one field and was read in one place,
RUN_SECTIONS_SELECTED_BY_TYPE named a two-item tuple used twice, and
_EXPERIMENT_FIELDS had one user. Write each rule in the function that
applies it, with the reason for the rollout_limit rule next to it.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
The docstring listed several rules in one dense paragraph. Show what
the function does instead: a small Experiment file, one override, and
the values it returns. The rules stay in the functions that apply
them.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
The function returns the Experiment as plain dicts, before
build_typed_experiment turns it into typed configs. Name it after
that: read_untyped_experiment in untyped_experiment.py, and call its
result the untyped Experiment wherever it is passed on.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
The rules for a Run with a different type and for a Run's own
rollout_limit match what a user expects, and the page stated them
twice. Keep the precedence list and the mapping override that
switches a Run's type.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
It returns an ArenaExperimentCfg, so name it after that.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
_compose_typed_config named Hydra's mechanism, not what it does. Call
it _build_cfg_from_values and say in its docstring what happens to the
values: type selects the class, Hydra checks the other values against
it, and missing fields keep their defaults. The build error and the
other docstrings say build as well.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
_experiment_name chose a default name, turned a numeric name into a
string and checked the type. ArenaExperimentCfg already checks that
the name is a non-empty single-line string, and a purely numeric name
is rare enough to quote. Keep only the default: the file stem, or the
current time without a file. Test ArenaExperimentCfg's name check,
which no test covered.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
untyped_experiment and typed_experiment_loader import only Hydra,
OmegaConf and light Arena modules, and neither imports the config
loader back. Importing experiment_runner loads the same heavy modules
as before. The registry imports stay inside their functions, because
they load the asset libraries.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
The function listed fields "not inherited" and spread the type
comparison over isinstance checks. Say what the two rules are: a Run
replaces the shared rollout_limit by declaring its own, and the
shared environment or policy by selecting another type. A small
_section_type helper reads a section's type.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
experiment_runner.py ran smoke_test_experiment.yaml when it got
neither a file nor overrides, which was a third case next to "a file"
and "overrides only". The install check now passes its Run as
overrides, so that case, select_experiment_config_path and the smoke
test file are gone. A bare experiment_runner.py stops before Isaac Sim
starts and asks for a file or a Run.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
The docstring of _shared_values_inherited_by_run explained why each
rule exists. Keep a one-line docstring and put each reason as a
comment above the rule it explains.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
"Unresolved values" named the interpolations, not what the function
receives. Say the values come from the untyped Experiment, with shared
merged in.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
The Experiment name check moved to ArenaExperimentCfg, so
experiment_cfg.name=null now fails with its message.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
@cvolkcvolk
cvolkcvolk force-pushed the cvolk/feature/experiment-command-line-runs branch from c6377fb to 2b9bac4 Compare December 2, 2026 14:55
@cvolkcvolk
cvolkcvolk enabled auto-merge (squash) December 2, 2026 14:56
@cvolkcvolk
cvolkcvolk merged commit 2a573e1 into main Dec 2, 2026
10 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