Skip to content

Commit f6341f0

Browse files
authored
Clarify Experiment override paths (#1127)
## Summary Clarify local and OSMO override paths ## Detailed description - Explain the local shared.* and runs.* override namespaces. - Show that OSMO Experiment overrides require the experiment_cfg.* prefix. - Add shared override examples and warn against the misleading +shared.* suggestion. Signed-off-by: Clemens Volk <cvolk@nvidia.com>
1 parent 8039fbd commit f6341f0

4 files changed

Lines changed: 90 additions & 40 deletions

File tree

docs/pages/concepts/concept_arena_experiments.rst

Lines changed: 53 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -74,36 +74,6 @@ field. Arena uses this name in command-line overrides, output directories, and r
7474
Runs keep their YAML order and execute locally in that order.
7575

7676

77-
Reuse values with ``shared``
78-
----------------------------
79-
80-
``shared`` removes repetition. Arena applies these values to every Run, then places each Run's
81-
own values on top. A Run only needs to declare what is different.
82-
83-
Values are applied in this order, from lowest to highest priority:
84-
85-
.. code-block:: text
86-
87-
typed configuration defaults
88-
89-
shared values, including shared.* CLI overrides
90-
91-
values written in an individual Run
92-
93-
runs.<name>.* CLI overrides
94-
95-
.. dropdown:: Configuration rules
96-
:animate: fade-in
97-
98-
* The only top-level fields are ``shared`` and ``runs``.
99-
* ``runs`` must contain at least one Run.
100-
* A Run name starts with a letter or underscore. It can then contain letters, numbers,
101-
underscores, or hyphens.
102-
* An override can change a field on a Run declared in the YAML, but it cannot add another Run.
103-
* A ``shared.*`` override must point to a field already present below ``shared``. The Hydra
104-
operators ``+``, ``++``, and ``~`` are not supported for shared values.
105-
106-
10777
.. _sequential-batch-experiment-runner:
10878

10979
One definition, two execution paths
@@ -125,22 +95,43 @@ One definition, two execution paths
12595
Turns every Run into an independently scheduled group. Runs can execute at the same time
12696
when resources are available. OSMO then collects their outputs into one combined result.
12797

98+
The CLI override root depends on the execution path:
99+
128100
.. tab-set::
129101

130102
.. tab-item:: Run locally
131103

104+
The Experiment Runner receives the Experiment Definition directly.
105+
106+
* Use ``shared.<path>=<value>`` to change a shared value.
107+
* Use ``runs.<name>.<path>=<value>`` to change one Run.
108+
132109
.. code-block:: bash
133110
134111
python isaaclab_arena/evaluation/experiment_runner.py \
135-
--experiment_config path/to/experiment.yaml
112+
--experiment_config path/to/experiment.yaml \
113+
shared.rollout_limit.num_steps=100
136114
137115
.. tab-item:: Preview an OSMO workflow
138116

117+
OSMO nests the Experiment below ``experiment_cfg``, so Experiment overrides need that prefix.
118+
119+
* Use ``experiment_cfg.shared.<path>=<value>`` to change a shared value.
120+
* Use ``experiment_cfg.runs.<name>.<path>=<value>`` to change one Run.
121+
139122
.. code-block:: bash
140123
141124
python -m osmo.submit_arena_experiment \
142125
--experiment_cfg path/to/experiment.yaml \
143-
--dry_run
126+
--dry_run \
127+
experiment_cfg.shared.rollout_limit.num_steps=100
128+
129+
If Hydra suggests ``+shared.<path>=<value>``, do not add ``+``. Use
130+
``experiment_cfg.shared.<path>=<value>`` instead.
131+
132+
Both commands override the same ``shared.rollout_limit.num_steps`` field declared in the
133+
Experiment Definition. A value written inside an individual Run still takes priority over the
134+
shared override.
144135

145136
For remote policies, configure the policy client inside its Run like any other policy. Start the
146137
policy server separately for local execution. OSMO can co-schedule a server for supported policy
@@ -152,6 +143,36 @@ For OSMO setup and submission options, see :doc:`Multi-node Evaluation
152143
<../example_workflows/multi_node_evaluation/multi_node_evaluation>`.
153144

154145

146+
Reuse values with ``shared``
147+
----------------------------
148+
149+
``shared`` removes repetition. Arena applies these values to every Run, then places each Run's
150+
own values on top. A Run only needs to declare what is different.
151+
152+
Values are applied in this order, from lowest to highest priority:
153+
154+
.. code-block:: text
155+
156+
typed configuration defaults
157+
158+
shared values, including shared.* CLI overrides
159+
160+
values written in an individual Run
161+
162+
runs.<name>.* CLI overrides
163+
164+
.. dropdown:: Configuration rules
165+
:animate: fade-in
166+
167+
* The only top-level fields are ``shared`` and ``runs``.
168+
* ``runs`` must contain at least one Run.
169+
* A Run name starts with a letter or underscore. It can then contain letters, numbers,
170+
underscores, or hyphens.
171+
* An override can change a field on a Run declared in the YAML, but it cannot add another Run.
172+
* A shared override must point to a field already present below ``shared`` in the Experiment
173+
YAML. The Hydra operators ``+``, ``++``, and ``~`` are not supported for shared values.
174+
175+
155176
Choosing a runner
156177
-----------------
157178

docs/pages/example_workflows/multi_node_evaluation/multi_node_evaluation.rst

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,16 +217,31 @@ For our experiment, the sensitivity analysis report looks like this:
217217
Adjust the Experiment at submission time
218218
----------------------------------------
219219

220-
You can tweak a Run at submission time, without editing its YAML file.
221-
To view the available override-able values, use the ``--list_overrides`` flag.
220+
You can adjust an Experiment at submission time without editing its YAML file. OSMO nests the
221+
Experiment below ``experiment_cfg``, so Experiment override paths start with that prefix.
222+
223+
To inspect the effective Run values and submission settings, use the ``--list_overrides`` flag.
224+
Shared values have already been expanded into the Runs in this output; inspect the Experiment YAML
225+
to see which paths are declared below ``shared``.
222226

223227
.. code-block:: bash
224228
225229
python osmo/submit_arena_experiment.py \
226230
--experiment_cfg isaaclab_arena_environments/robolab/experiment_configs/robolab_20_tasks_pi0_and_cosmos.yaml \
227231
--list_overrides
228232
229-
For example, to shorten the banana in bowl ``pi0.5`` run to four episodes:
233+
For example, to shorten every Run to four episodes, override the value declared below ``shared``:
234+
235+
.. code-block:: bash
236+
237+
python osmo/submit_arena_experiment.py \
238+
--experiment_cfg isaaclab_arena_environments/robolab/experiment_configs/robolab_20_tasks_pi0_and_cosmos.yaml \
239+
experiment_cfg.shared.rollout_limit.num_episodes=4
240+
241+
Do not add ``+`` to a shared override. If Hydra suggests ``+shared.<path>=<value>``, use the missing
242+
``experiment_cfg.`` prefix instead.
243+
244+
To shorten only the banana in bowl ``pi0.5`` Run to four episodes:
230245

231246
.. code-block:: bash
232247

docs/pages/quickstart/arena_experiment.rst

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,19 @@ records every Run, its status, and its episode results.
9898
Change values from the command line
9999
-----------------------------------
100100

101-
You can adjust declared values without editing the YAML. This command reduces the number of
102-
parallel environments in the ``parallel_envs`` Run:
101+
You can adjust declared values without editing the YAML. This command changes the shared episode
102+
limit inherited by every Run:
103+
104+
.. code-block:: bash
105+
106+
python isaaclab_arena/evaluation/experiment_runner.py \
107+
--viz kit \
108+
--experiment_config isaaclab_arena_environments/experiment_configs/getting_started_experiment.yaml \
109+
shared.rollout_limit.num_episodes=4
110+
111+
A value written directly inside a Run would still take priority over this shared override. To
112+
change only one Run, start the path with ``runs.<name>``. This command reduces the number of
113+
parallel environments in ``parallel_envs``:
103114

104115
.. code-block:: bash
105116
@@ -108,8 +119,9 @@ parallel environments in the ``parallel_envs`` Run:
108119
--experiment_config isaaclab_arena_environments/experiment_configs/getting_started_experiment.yaml \
109120
runs.parallel_envs.environment_builder.num_envs=8
110121
111-
This changes only ``environment_builder.num_envs`` in the ``parallel_envs`` Run. All other values
112-
remain as written in the YAML.
122+
This changes only ``environment_builder.num_envs`` in the ``parallel_envs`` Run. OSMO uses the same
123+
paths below ``experiment_cfg``; for example, the shared override above becomes
124+
``experiment_cfg.shared.rollout_limit.num_episodes=4`` at submission time.
113125

114126
See :doc:`Arena Experiments <../concepts/concept_arena_experiments>` for the full
115127
precedence order and configuration rules.

isaaclab_arena_environments/experiment_configs/getting_started_experiment.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
# An Arena Experiment with shared values and four named Runs.
77
# Values under shared are used by every Run below.
88
# A Run only needs to list what is different; its values override the shared ones.
9-
# Use shared.<path>=<value> on the command line to change a shared value.
9+
# To change a shared value on the command line:
10+
# - with experiment_runner.py, use shared.<path>=<value>
11+
# - with osmo/submit_arena_experiment.py, use experiment_cfg.shared.<path>=<value>
1012
# A value written directly in a Run still takes priority.
1113
shared:
1214
environment:

0 commit comments

Comments
 (0)