Skip to content

Stop accepting JSON Experiment files and --chunk_size in experiment_runner.py - #1705

Merged
cvolkcvolk merged 5 commits into
mainfrom
cvolk/chore/remove-json-experiments
Nov 19, 2026
Merged

cvolkcvolk merged 5 commits into
mainfrom
cvolk/chore/remove-json-experiments

Conversation

@cvolkcvolk

@cvolkcvolk cvolkcvolk commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

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:

{
  "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:

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.

@greptile-apps

greptile-apps Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge in the stated order, after #1701 updates the remaining documentation example.

Summary

Removes legacy JSON Experiment loading and makes typed YAML the only supported format.

  • The Experiment Runner now accepts typed YAML files instead of JSON jobs.
  • EnvironmentRegistry no longer looks up config types by factory.

cvolkcvolk explicitly requires #1701 to merge first to remove the remaining JSON documentation example. The removal of chunking without a YAML replacement is intentional.

No actionable issues found.

Reviews (1) · Last reviewed commit: "Remove the environment factory-to-config..." · Reviewed by Greptile

@arena-review-bot

Copy link
Copy Markdown
Contributor

🤖 Isaac Lab-Arena Review Bot

Summary

This PR removes the JSON Experiment path from the Experiment Runner. It deletes legacy_eval_config.py, legacy_experiment_runner.py, the .json branch in load_arena_experiment_from_config_file, --eval_jobs_config, --chunk_size and EnvironmentRegistry.get_environment_cfg_type. The removal is clean. Two small follow-ups are below: OSMO still repeats the YAML check, and part of the graph-YAML CLI helper is now only reached by a test.

Findings

🔵 Improvement: isaaclab_arena/evaluation/arena_experiment_config_loader.py:25: osmo/submit_arena_experiment.py:103-106 repeats this YAML suffix check right before it calls the loader. The OSMO copy can go.

🔵 Improvement: isaaclab_arena/evaluation/legacy_environment_cli_args.py:10: the only production caller passes a graph YAML path. The registered-name branch and the priority_keys ordering now run only in a unit test.

When this was reviewed, pre-commit was still running and the test jobs hadn't reported, so I couldn't confirm test results.

Verdict

Ship it

@cvolkcvolk cvolkcvolk changed the title Remove legacy JSON Experiment loading Stop accepting JSON Experiment files and --chunk_size in experiment_runner.py Nov 19, 2026
cvolkcvolk added a commit that referenced this pull request Nov 19, 2026
Port the Experiment Runner tests that still use legacy JSON to YAML
Experiments or typed Run configs, delete the ones YAML tests already
cover, and move the graph-spec CLI tests out of
`test_legacy_eval_config.py`. After this PR, only the JSON loader's own
tests still use JSON, and #1705 removes them together with the loader.

## Why this change?

#1705 removes JSON Experiment loading. Nine tests still use it: they
write a JSON jobs file or pass a jobs dict to the JSON adapter.

Four of them check something no YAML test covers, so they are ported:

- `test_experiment_runner_graph_spec_with_variation`: runs a graph-spec
environment end to end through the Experiment Runner.
- `test_experiment_runner_all_environments`: runs every registered
environment for a few steps.
- `test_experiment_runner_with_gr00t_remote_closedloop_policy`: runs the
Experiment Runner against a remote GR00T policy server.
- `test_eval_config_variation_lands_in_events_cfg`: checks that a Run's
variations become event terms in `env_cfg.events`.

The other five are covered by YAML tests and are deleted:

- `test_experiment_runner_two_jobs_zero_action`:
`test_experiment_runner_runs_with_different_env_counts`.
- `test_experiment_runner_multiple_environments`:
`test_experiment_runner_all_environments`.
- `test_experiment_runner_different_embodiments`:
`test_experiment_runner_runs_with_different_env_counts` and
`test_experiment_runner_all_environments`.
- `test_experiment_runner_with_variations`:
`test_experiment_runner_replays_recorded_variation_samples`.
- `test_experiment_runner_enable_cameras`: the ported graph-spec test,
which now also runs its camera-less Run.

## What changes?

- The subprocess tests write YAML Experiments to `tmp_path` and pass
`--experiment_output_directory`, so they no longer write to `outputs/`
in the working directory. `run_experiment_runner` always passes
`--experiment_config`.
- The all-environments smoke test passes `--continue_on_error` and
checks every Run's status with a new `read_run_statuses` helper, so it
names every broken environment, not only the first. The ported
graph-spec and GR00T tests rely on the exit code: without
`--continue_on_error`, a failed Run makes the runner exit non-zero.
- The graph-spec test becomes
`test_experiment_runner_graph_spec_camera_run_and_camera_less_run`.
- `test_eval_config_variation_lands_in_events_cfg` becomes
`test_run_variation_lands_in_events_cfg` and builds an `ArenaRunCfg`
directly.
- The tests for `legacy_environment_args_to_cli_args` and
`build_arena_builder_from_legacy_graph` move to
`test_legacy_graph_environment_cli.py`. YAML graph-spec Runs use both
functions. The tests now use the inputs such a Run produces and compare
against literal values.

## Validation

- Each ported Run equals the `ArenaRunCfg` the JSON adapter built from
the old test data. I checked this with a one-off script for all 19
environments, the GR00T Run, the camera-less Run and the typed Runs. The
graph-spec Run differs only in
`LegacyGraphEnvironmentCfg.enable_cameras`: the YAML loader sets it from
the Run, the JSON adapter left it `False`. The environment's CLI
arguments are the same.
- Locally in the Arena container, every test in
`test_experiment_runner.py` passes, including the graph-spec test with
both Runs and `test_run_variation_lands_in_events_cfg`.
`test_experiment_runner_all_environments` completes all 19 Runs.
- The GR00T test skips without a GR00T server, so only CI's
`test_gr00t_closedloop_e2e` job runs it. I did not run it.

---------

Signed-off-by: Clemens Volk <[email protected]>
Typed YAML Experiments replaced the JSON jobs format. No JSON
Experiment is checked in since #1531, and #1704 ported or deleted the
tests that still wrote JSON.

Delete legacy_eval_config.py, legacy_experiment_runner.py and the .json
branch of load_arena_experiment_from_config_file. A .json path now fails
before startup with a message that points to YAML Experiments.

Remove the --eval_jobs_config alias and --chunk_size. Chunked dispatch
only ever worked for JSON jobs. Long sweeps on OSMO already run each
Run in its own process.

Delete the tests that covered only the JSON adapter, the JSON camera
check, chunking and the JSON override rejection.

Signed-off-by: Clemens Volk <[email protected]>
EnvironmentRegistry.get_environment_cfg_type and its
_cfg_types_by_factory_type map existed so the JSON adapter could turn
an environment name into its config type. Their TODO asked to remove
both with that adapter.

The tests that used the lookup now read get_environment_cfg_types(),
which the YAML loader uses.

Signed-off-by: Clemens Volk <[email protected]>
build_arena_experiment_submission_cfg asserted a .yaml or .yml path
and then called load_arena_experiment_from_config_file, which now
rejects every other suffix itself and tells JSON users to write a
YAML Experiment. The OSMO copy was only needed while the loader still
accepted JSON.

Signed-off-by: Clemens Volk <[email protected]>
legacy_environment_cli_args.py turned legacy environment arguments into
CLI tokens. Its only caller left, build_arena_builder_from_legacy_graph,
always passes a graph YAML path. So the branch for a registered
environment name, and the priority ordering that kept parent-parser
flags ahead of that positional name, only ran in a unit test.

Replace the module with _graph_environment_cli_args in
legacy_graph_environment_cli.py, which emits --env_spec and the Run's
per-run overrides. Both get deleted together once graph-YAML
environments have a typed configuration. The builder test now checks
the boolean and value handling the removed unit test covered.

Signed-off-by: Clemens Volk <[email protected]>
Describe _graph_environment_cli_args with an input and the arguments it
returns, and spell out the three cases in the loop: skip unset values
and switched-off flags, pass True as a bare flag, and pass everything
else as a flag and value. The returned arguments are unchanged.

Signed-off-by: Clemens Volk <[email protected]>
@cvolkcvolk
cvolkcvolk changed the base branch from cvolk/chore/experiment-runner-tests-yaml to main November 19, 2026 13:17
@cvolkcvolk
cvolkcvolk force-pushed the cvolk/chore/remove-json-experiments branch from 8ffd4b4 to 663bf9d Compare November 19, 2026 13:17

@david-tingdahl-nvidia david-tingdahl-nvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good riddance. Thanks for cleaning this up!
I had my agent look for any stale json code or mentions, and it found some suggestions:

Stale or wrong docs and docstrings (these should be fixed)

  1. ~/develop/IsaacLab-Arena/docs/pages/example_workflows/reinforcement_learning/step_3_evaluation.rst:98-143 still documents "Method 3: Batch Evaluation" with a JSON config.
    • It says "use experiment_runner.py with a JSON config" and shows an eval_config.json with a "jobs" list. That list uses policy_type, arena_env_args and policy_config_dict.
    • It runs experiment_runner.py ... --eval_jobs_config eval_config.json.
    • That flag and the JSON format are what the PR removes, and the loader now rejects .json files. This section needs rewriting as a YAML Experiment with Runs.
  2. ~/develop/IsaacLab-Arena/isaaclab_arena/policy/rsl_rl_action_policy.py:60-80: the RslRlActionPolicy docstring still has a .. code-block:: json "Example configuration for Experiment Runner" in the old {"jobs": [...]} shape. It should become a YAML Run example. The line "No separate
    JSON config file is required" is also leftover wording that can go.

Fine to leave as is (intentional)

  • The rejection message in arena_experiment_config_loader.py:27 and the two tests that assert it:
    • test_arena_experiment_config_loader.py:404, the experiment.json parametrization.
    • test_osmo_experiment_workflow.py:989, test_submission_rejects_legacy_json_experiment.
  • All the arena_experiment_result.json, timings.json, kpis.json and .jsonl output and recording files.
  • legacy_environment_cli_args.py and the LegacyGraphEnvironmentCfg classes. They are named "legacy" but are not JSON.

Possibly stale, worth a look

  • ~/develop/IsaacLab-Arena/docs/pages/references/release_notes.rst:250 already says legacy evaluation jobs were replaced with typed YAML. Check whether you want a migration note for JSON users in migration_guide_v0_4.rst. I found no mention there.

@cvolkcvolk

Copy link
Copy Markdown
Collaborator Author

AI-drafted (Claude Code), reviewed by me.

@david-tingdahl-nvidia Thanks! 1 and 2 are already fixed on main by #1701 (the RL tutorial and the RslRlActionPolicy docstring now use YAML), and this PR is rebased on it. legacy_environment_cli_args.py is gone in this PR as well, since only graph-spec Runs used it.

@cvolkcvolk
cvolkcvolk enabled auto-merge (squash) November 19, 2026 15:46
@cvolkcvolk
cvolkcvolk merged commit 2216810 into main Nov 19, 2026
17 of 28 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