Repository navigation
Run an Experiment from the command line without a YAML file - #1737
Conversation
[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. FindingsSummaryThe PR applies overrides before building typed Runs and allows local Experiments without a YAML file.
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]
Reviews (1) · Last reviewed commit: "Fix override wording in docs, help and s..." · Reviewed by Greptile |
🤖 Isaac Lab-Arena Review BotSummaryThis PR applies every Experiment override to the plain Experiment mapping before typed Runs are built. That lets Design, Boundaries & ScopeThe new rule that a Run with a different Findings🔴 Critical: isaaclab_arena/hydra/experiment_overrides.py:63: Overrides of variations that a file writes as flat dotted keys are silently ignored.
🟡 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: Already raised, not repeated here:
One more case for the interpolation thread: a Test Coverage and CI Cost
VerdictSignificant concerns |
d4eaac5 to
2609441
Compare
|
/review |
|
The review did not return a complete result. Please run Requested in this comment. |
|
/review |
|
The review did not return a complete result. Please run Requested in this comment. |
a4cdf9e to
d82883e
Compare
de0be96 to
c6377fb
Compare
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>
c6377fb to
2b9bac4
Compare
Let
experiment_runner.pyrun 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.typeorpolicy.type.policy_runner.pyruns 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:
Change a Run's environment in a file:
An Experiment given on the command line is named
<timestamp>_experimentunlessname=is set. The full override rules are on the Experiments concept page.Changes to existing behavior:
experiment_runner.pywithout 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, andsmoke_test_experiment.yamlis removed.environment.typeorpolicy.typediffers fromsharedno longer inherits thatsharedsection. Fields both types have, such asembodiment, must be set in the Run.extend_list(...)is rejected.In the code,
read_untyped_experimentin the newisaaclab_arena/hydra/untyped_experiment.pyreads the file and applies the overrides before Isaac Sim starts, andbuild_typed_experimentbuilds the typed configs from that untyped Experiment. #1730 changes a parameter ofbuild_typed_experiment; whichever PR merges second adapts it.Validation
main.smoke_testcompleted.quickcompleted, and the Experiment was named2026-11-30_10-34-00_experiment.--dry_runwith anexperiment_cfg.*override renders the workflow with the new value in that Run only.