Skip to content

Run the RL evaluation tutorial with Experiment YAMLs - #1701

Merged
cvolkcvolk merged 7 commits into
mainfrom
cvolk/docs/rl-evaluation-experiments
Nov 19, 2026
Merged

cvolkcvolk merged 7 commits into
mainfrom
cvolk/docs/rl-evaluation-experiments

Conversation

@cvolkcvolk

@cvolkcvolk cvolkcvolk commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Update the Franka Lift Object RL evaluation tutorial to run experiment_runner.py with two new Experiment YAMLs instead of policy_runner.py and an inline JSON config. Replaces the RL part of #1465; its Dexsuite part is obsolete since #1666 removed that workflow.

Why this change?

The page evaluated checkpoints with policy_runner.py, which is being deprecated. Its batch evaluation had readers write eval_config.json and pass it with --eval_jobs_config, and JSON Experiment loading is about to be removed. This is the last docs page that uses a JSON Experiment.

What changes?

  • Add lift_object_rsl_rl_experiment.yaml, one Run for single and parallel evaluation. Parallel evaluation overrides num_envs, env_spacing and num_episodes on the command line.
  • Add lift_object_rsl_rl_checkpoints_experiment.yaml, one Run per checkpoint, to replace eval_config.json.
  • Both YAMLs read the pre-trained checkpoints from $MODELS_DIR/lift_object_checkpoint/, the folder the page downloads to. When MODELS_DIR is unset, they fall back to the page's default folder. Readers who trained their own policy override checkpoint_path.
  • The sample outputs show what the documented commands print for the pre-trained download.
  • The RslRlActionPolicy docstring shows a YAML Run instead of a JSON job.

Validation

Locally in the Arena container, with the checkpoints downloaded as the page describes:

  • Method 1, 20 episodes: success rate 1.0000.
  • Method 2, 64 envs and 1024 episodes: 1.0000.
  • Method 3, 1024 episodes per checkpoint: 0.9697 for model_1000.pt, 1.0000 for model_1999.pt.
  • Both YAMLs compose with MODELS_DIR set to another folder and with it unset, and the checkpoint_path override on the page replaces the default path. Method 1 also ran with MODELS_DIR set.
  • The docs build passes with -W.

The runs were headless; --viz kit was not tried.

policy_runner.py is being replaced by experiment_runner.py, and
evaluation becomes YAML-only. The lift_object RL evaluation page
still used policy_runner.py for single and parallel evaluation and
an inline legacy JSON config for the batch evaluation.

Add a one-Run Experiment YAML for the checkpoint evaluation; the
parallel variant becomes runs.<name>.* overrides. Replace the JSON
config with a checked-in YAML that has one Run per checkpoint and
shares the environment, policy type, and rollout limit. Both files
read the checkpoints of the pre-trained download, so they run as
is; the page shows how to point them at a local training run.

Signed-off-by: Clemens Volk <[email protected]>
The tutorial downloads the checkpoints to
$HOME/models/isaaclab_arena/reinforcement_learning since #1612, but
both Experiment YAMLs pointed at /models/..., which exists in neither
runtime.

Point them at ${oc.env:HOME}/models/isaaclab_arena/reinforcement_learning.
HOME is always set, so a checkpoint_path override still works when
the pre-trained checkpoints were not downloaded. MODELS_DIR would not
work there, because the loader resolves each Run's policy before
command-line overrides apply.

Signed-off-by: Clemens Volk <[email protected]>
The docstring example was a legacy JSON job, which the Experiment
Runner is about to stop loading, and its list-valued arena_env_args
was already rejected by the JSON adapter. Show the same evaluation as
a Run in an Experiment YAML, and stop naming policy_runner.py in the
inference wrapper docstring.

Signed-off-by: Clemens Volk <[email protected]>
The sample outputs came from an earlier run with other checkpoints.
Replace them with the metrics the three documented commands print for
the pre-trained download. Those checkpoints score above the 70-90%
range the page gave for a well-trained policy, so it now says at least
70%.

Signed-off-by: Clemens Volk <[email protected]>
@greptile-apps

greptile-apps Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no actionable issues were found.

Summary

The tutorial now uses YAML experiments for single-environment, parallel, and multi-checkpoint evaluation.

  • Single and parallel Lift Object checks use one Experiment YAML.
  • One Experiment YAML evaluates both Lift Object checkpoints in order.

No actionable issues found.

Reviews (1) · Last reviewed commit: "Show measured RL evaluation results" · Reviewed by Greptile

@arena-review-bot

Copy link
Copy Markdown
Contributor

🤖 Isaac Lab-Arena Review Bot

Summary

This PR moves the Franka Lift Object RL evaluation tutorial from policy_runner.py and an inline JSON config to experiment_runner.py with two new Experiment YAMLs. It also updates the RslRlActionPolicy docstring example to a YAML Run. The change is clean and limited to docs and example configs. I have two small, optional suggestions.

Findings

🔵 Improvement: isaaclab_arena_environments/experiment_configs/reinforcement_learning/lift_object_rsl_rl_experiment.yaml:17: The checkpoint folder is hard-coded to the path the page exports as MODELS_DIR. ${oc.env:MODELS_DIR,<default>} would use the reader's MODELS_DIR and still work when it's unset. The same change applies to both Runs in lift_object_rsl_rl_checkpoints_experiment.yaml. See the inline comment.

The underlying limit is in the loader. _compose_typed_config_from_yaml_selector (isaaclab_arena/hydra/typed_experiment_loader.py:431) resolves each Run's policy section with OmegaConf.to_object before load_arena_experiment_from_yaml applies the runs.<name>.* overrides (line 110). As a result, an override can't replace a policy value that fails to resolve. That could be tracked in a separate issue; it doesn't need to block this docs PR.

Test Coverage and CI Cost

test_rl_train_and_eval_lift_object in isaaclab_arena/tests/test_rsl_rl.py still evaluates through policy_runner.py, which this PR describes as being deprecated. I found no test that runs the rsl_rl policy through experiment_runner.py, so CI doesn't exercise the YAML or the override paths the tutorial now documents.

Could a follow-up switch that test's evaluation step to experiment_runner.py with lift_object_rsl_rl_experiment.yaml? It would override policy.checkpoint_path, environment.embodiment, and the rollout limit. The test already starts one simulator subprocess for evaluation, so this replaces that subprocess rather than adding one.

CI tests for c77a660 were still running when I reviewed (the Arena image build was in progress), so I couldn't confirm their results.

Verdict

Ship it

The three methods were named after the tools they used to need:
policy_runner.py for one or many environments, and the old eval_runner
for "batch evaluation" of several checkpoints. All three now run
experiment_runner.py, and the only real difference is one Run versus
one Run per checkpoint.

Describe each method by what it evaluates, and rename Method 3 to
"Compare Checkpoints".

Signed-off-by: Clemens Volk <[email protected]>
The sentence contrasted the policy with ones that need a separate
config file, which the docstring does not explain, so it read as
confusing.

Signed-off-by: Clemens Volk <[email protected]>
The YAMLs repeated the folder from the page's MODELS_DIR export, so a
reader who chose another MODELS_DIR got a missing checkpoint.

Read ${oc.env:MODELS_DIR,<default>}, where the default is the folder
from the export command. An unset MODELS_DIR now falls back to that
folder instead of failing to compose, which was the reason the YAMLs
did not use it.

Signed-off-by: Clemens Volk <[email protected]>
@cvolkcvolk
cvolkcvolk merged commit 813be56 into main Nov 19, 2026
10 checks passed
cvolkcvolk added a commit that referenced this pull request Nov 19, 2026
…unner.py (#1705)

Make `experiment_runner.py` accept only YAML Experiments. JSON
Experiment files, the `--eval_jobs_config` alias and `--chunk_size` are
removed.

## Why this change?

YAML Experiments replaced the JSON jobs format. Since #1531 no JSON
Experiment is checked in, and after #1701 and #1704 no doc or test uses
one. The JSON path still kept two modules and a second code path through
the loader and the runner.

## What changes?

For users:

- A `.json` Experiment now fails before Isaac Sim starts, with a message
that points to YAML. Rewrite each job as a Run in a YAML Experiment, as
in the example below.
- `--eval_jobs_config` and `--chunk_size` are gone. Passing either fails
as an unrecognized argument.

In the code:

- Delete `legacy_eval_config.py`, `legacy_experiment_runner.py` and the
`.json` branch of `load_arena_experiment_from_config_file`.
- Delete `EnvironmentRegistry.get_environment_cfg_type`, which only the
JSON adapter used.
- Drop the YAML check in OSMO submission. The loader now does it.
- Move the graph-spec CLI token helper into
`legacy_graph_environment_cli.py`, its only user, and delete
`legacy_environment_cli_args.py`.
- Delete the tests of the removed code.

### Why `--chunk_size` can go

`--chunk_size` (#751) ran each chunk of JSON jobs in a fresh process, to
free host memory that leaked on every environment build.

- It only ever worked for JSON. YAML Experiments never had it.
- It split by job, so all rebuilds of a Run still shared one process.
- The leak is mostly gone on the current stack. I ran one Run with many
rebuilds in one runner process and measured memory between builds:

| Environment | Rebuilds | Growth per rebuild |
|---|---|---|
| `cube_goal_pose` | 25 | about 1 MiB |
| `pick_and_place_maple_table` with cameras | 13 | about 40 MiB |

On OSMO each Run runs in its own process anyway.

## Usage example

Before:

```json
{
  "jobs": [
    {
      "name": "lift_object_model_1000",
      "policy_type": "rsl_rl",
      "num_episodes": 1024,
      "arena_env_args": {"environment": "lift_object", "num_envs": 64},
      "policy_config_dict": {"checkpoint_path": "model_1000.pt"}
    }
  ]
}
```

After:

```yaml
runs:
  lift_object_model_1000:
    environment:
      type: lift_object
    environment_builder:
      num_envs: 64
    policy:
      type: rsl_rl
      checkpoint_path: model_1000.pt
    rollout_limit:
      num_episodes: 1024
```

## Validation

Locally in the Arena container:

- A `.json` config, `--eval_jobs_config` and `--chunk_size` each fail
before Isaac Sim starts.
- The loader, run execution, graph CLI, Hydra, environment config, OSMO
workflow, benchmark and RoboLab config tests pass.
- All subprocess tests in `test_experiment_runner.py` pass, including
the graph-spec Run end to end, and so does the all-environments smoke
test.

---------

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