Repository navigation
Run the RL evaluation tutorial with Experiment YAMLs - #1701
Conversation
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]>
[Low impact] The PR appears safe to merge; no actionable issues were found. SummaryThe tutorial now uses YAML experiments for single-environment, parallel, and multi-checkpoint evaluation.
No actionable issues found. Reviews (1) · Last reviewed commit: "Show measured RL evaluation results" · Reviewed by Greptile |
🤖 Isaac Lab-Arena Review BotSummaryThis PR moves the Franka Lift Object RL evaluation tutorial from 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 The underlying limit is in the loader. Test Coverage and CI Cost
Could a follow-up switch that test's evaluation step to CI tests for VerdictShip 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]>
…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]>
Update the Franka Lift Object RL evaluation tutorial to run
experiment_runner.pywith two new Experiment YAMLs instead ofpolicy_runner.pyand 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 writeeval_config.jsonand 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?
lift_object_rsl_rl_experiment.yaml, one Run for single and parallel evaluation. Parallel evaluation overridesnum_envs,env_spacingandnum_episodeson the command line.lift_object_rsl_rl_checkpoints_experiment.yaml, one Run per checkpoint, to replaceeval_config.json.$MODELS_DIR/lift_object_checkpoint/, the folder the page downloads to. WhenMODELS_DIRis unset, they fall back to the page's default folder. Readers who trained their own policy overridecheckpoint_path.RslRlActionPolicydocstring shows a YAML Run instead of a JSON job.Validation
Locally in the Arena container, with the checkpoints downloaded as the page describes:
model_1000.pt, 1.0000 formodel_1999.pt.MODELS_DIRset to another folder and with it unset, and thecheckpoint_pathoverride on the page replaces the default path. Method 1 also ran withMODELS_DIRset.-W.The runs were headless;
--viz kitwas not tried.