Skip to content

Deprecate multi-GPU evaluation with torchrun - #1459

Merged
cvolkcvolk merged 5 commits into
mainfrom
cvolk/docs/deprecate-torchrun-evaluation
Nov 18, 2026
Merged

cvolkcvolk merged 5 commits into
mainfrom
cvolk/docs/deprecate-torchrun-evaluation

Conversation

@cvolkcvolk

@cvolkcvolk cvolkcvolk commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Deprecate multi-GPU evaluation with torchrun and policy_runner.py --distributed, and remove it from the evaluation tutorials. To use several GPUs, run an Experiment on OSMO, which runs each Run on its own GPU and combines the results; policy_runner.py --distributed still works but prints a FutureWarning until policy_runner.py is removed.

Why this change?

torchrun evaluation is one of the reasons the docs still send users to policy_runner.py, which we plan to deprecate in favor of experiment_runner.py. We decided to drop it rather than port it, because its results were never combined into one evaluation.

Running in parallel itself works: torchrun starts one policy_runner.py process per GPU, and each process runs the full step or episode budget with --seed plus its rank, so more GPUs evaluate more episodes in the same time. What doesn't work is everything after the rollouts:

  • There is no combined result. Each process prints its own Metrics: line, and nothing adds them up into one success rate.
  • The report can miss results. Only the process with local rank 0 calls build_report, right after its own env.close(), without waiting for the others. It reads only its own output directory, and each process picks a timestamped directory (timestamped_run_dir) after Isaac Sim starts, so processes that get there in different seconds write to different directories.
  • Videos can overwrite each other. Video file names don't include the rank, so processes that share a directory write over each other's videos.
  • Seeds repeat across machines. The seed offset is the rank within one machine (LOCAL_RANK), so with more than one machine every machine runs the same episodes. The tutorials only use one machine.

No test or CI job covers it. It was added in #411 for multi-GPU benchmarking of Arena environments. Each process ran its own simulation and its own local GR00T policy (Gr00tClosedloopPolicy). #662 removed Gr00tClosedloopPolicy.

What changes?

  • policy_runner.py emits a FutureWarning when it gets --distributed. The warning also says that ranks do not merge their metrics and that the report from local rank 0 can miss results from other ranks. The shared --distributed flag itself stays unchanged, because environment_registration_callback reads it when it starts the app for RL training.
  • The "Distribute Multi-GPU Evaluation" tabs are removed from step_5_evaluation.rst in sequential_static_manipulation and locomanipulation. The single-GPU commands remain. The parallel command on the sequential_static_manipulation page also gets the --viz kit it was missing.
  • The "Choosing a runner" note in docs/pages/concepts/concept_arena_experiments.rst and the "Hand off other workflows" list in skills/user/run-experiment/SKILL.md no longer mention torchrun.

Using several GPUs instead:

  • On one machine: evaluate in one process with more environments (environment_builder.num_envs in an Experiment).
  • On several GPUs: submit the Experiment to OSMO with osmo/submit_arena_experiment.py (see the Multi-Node Evaluation page). ArenaExperimentWorkflow runs each Run in its own OSMO group, starts its policy server next to it if needed, and collects all Runs into one Experiment result and report. A single Run uses one GPU, so spreading one configuration over several GPUs means splitting it into several Runs, for example with different seeds.
  • Limitation: Gr00tServerTask on OSMO only serves the GR00T DROID checkpoint, so the GR1 and G1 GR00T tutorials that lose their multi-GPU tab cannot move to OSMO as they are.

The RL training page reinforcement_learning/step_2_policy_training.rst still passes --distributed to train.py. There, Isaac Lab's training CLI and Arena's environment_registration_callback both read it, and multi-GPU training is not deprecated.

The release notes are written when a release is cut, so the deprecation should be listed in the next release's notes.

Validation

  • Rebased onto main at 9b9e5b8350. Before the rebase, CI passed: Run tests, Run tests with subprocess, GR00T closed-loop E2E, the docs build, and pre-commit.
  • Locally, in an Arena Docker image built from main: test_distributed_evaluation_warns_about_deprecation passes, make SPHINXOPTS=-W html in docs/ passes, and pre-commit passes.
  • Not run locally: tests that start Isaac Sim. The image built from main uses PyTorch built for CUDA 13.0, which needs a newer NVIDIA driver than the test machine has.

@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

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

Summary

Deprecates multi-GPU evaluation through policy_runner.py while keeping the existing flag working.

  • The distributed policy-runner flag now warns users it is deprecated.
  • Evaluation guides and runner advice steer users away from torchrun.

No actionable issues found. Tests were not run during this review.

Reviews (2) · Last reviewed commit: "Deprecate multi-GPU evaluation with torc..." · Reviewed by Greptile

@arena-review-bot

arena-review-bot Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Isaac Lab-Arena Review Bot

Summary

This is a re-review after the rebase onto main. The change is the same as before, except that it no longer touches the static_manipulation tutorial, which main has since removed. I have two new optional suggestions. These earlier comments still apply to this head and aren't repeated here:

  • the inline comment on the warning wording,
  • the inline comment on the main() docstring,
  • the inline comment on the missing --viz kit in the sequential Step 2 command,
  • the summary note on the "not supported yet" message at experiment_runner_cli.py:113.

CI hasn't validated the rebased head yet. On 7af2d1e, "Run tests", "Run tests with subprocess", and "Build the docs" show as skipped, and "Pre-commit" is still queued.

Findings

🔵 Improvement: isaaclab_arena/cli/isaaclab_arena_cli.py:65: The help text marks the shared --distributed flag itself as deprecated. But environment_registration_callback (isaaclab_interop.py:93-99) also reads that flag and passes it to AppLauncher. The RL tutorial's train.py --distributed command runs through that callback, so the flag isn't only Isaac Lab's there, as the PR description says. Limiting the deprecation to policy_runner.py evaluation would keep the flag from being deleted along with the Policy Runner. (inline)

🔵 Improvement: docs/pages/concepts/concept_arena_experiments.rst:239: The "Choosing a runner" note says torchrun evaluation is deprecated but doesn't say what to use instead. The runtime warning already names the alternatives. (inline)

Verdict

Ship it, once CI passes on the rebased head.

@cvolkcvolk
cvolkcvolk marked this pull request as draft October 16, 2026 08:39
policy_runner.py --distributed under torchrun starts one independent
process per GPU. The ranks do not merge their metrics, can write to
different timestamped directories, and rank 0 builds the report
without waiting for the other ranks. No test covers it, and its
original use, one local GR00T policy per GPU, went away with #662.

Deprecate it together with policy_runner.py instead of porting it to
the Experiment Runner:

- Warn with a FutureWarning when policy_runner.py gets --distributed,
  and mark the flag as deprecated in its help text.
- Remove the multi-GPU tabs from the static manipulation, sequential
  static manipulation, and locomanipulation evaluation pages.
- Update the runner note in the Experiments concept page and the
  run-experiment skill.

Signed-off-by: Clemens Volk <[email protected]>
@cvolkcvolk
cvolkcvolk force-pushed the cvolk/docs/deprecate-torchrun-evaluation branch from 9f4673d to 7af2d1e Compare November 17, 2026 12:58
@cvolkcvolk
cvolkcvolk marked this pull request as ready for review November 17, 2026 17:09
The deprecation warning now also says that ranks do not merge their
metrics and that the report from local rank 0 can miss results from
the other ranks. The docs no longer show this path, so the warning is
the only place a remaining user learns this.

Drop the docstring line that still recommended --distributed, and add
the missing --viz kit to the parallel evaluation command on the
sequential static manipulation page, which says it opens the GUI.

Signed-off-by: Clemens Volk <[email protected]>
The docs no longer show multi-GPU evaluation with torchrun, and
policy_runner.py warns when it gets --distributed. Drop the sentence
from the runner note on the Experiments concept page.

Signed-off-by: Clemens Volk <[email protected]>
--distributed is a shared Arena flag. The Isaac Lab callback reads it
when it starts the simulation app, so multi-GPU RL training through
train.py still needs it. Only its use for policy_runner.py evaluation
is deprecated, so the help text now says that.

Signed-off-by: Clemens Volk <[email protected]>
Comment thread skills/user/run-experiment/SKILL.md Resolved
--distributed is a shared flag, and its help text appears in every
script that uses the Arena parser. policy_runner.py already warns when
it gets the flag, so restore the original help text.

The docs no longer show torchrun evaluation, so the run-experiment
skill does not need to tell agents not to suggest it.

Signed-off-by: Clemens Volk <[email protected]>
@cvolkcvolk
cvolkcvolk merged commit 02a9b1e into main Nov 18, 2026
10 checks passed
cvolkcvolk added a commit that referenced this pull request Nov 18, 2026
Move `rollout_policy` into a new `isaaclab_arena/evaluation/rollout.py`,
and replace `get_policy_cls` with
`resolve_policy_type_from_name_or_class_path` in
`arena_experiment_config_loader.py`. After this, nothing that
`experiment_runner.py` uses imports `policy_runner.py`.

## Why this change?

We plan to deprecate `policy_runner.py` in favor of
`experiment_runner.py`. Two modules that `experiment_runner.py` uses
still imported code from it:

- `run_execution.py` imported `rollout_policy`.
- `legacy_eval_config.py` imported `get_policy_cls` to resolve a legacy
JSON Experiment's policy.

`policy_runner.py` could not be deleted without breaking
`experiment_runner.py`.

## What changes?

- `rollout_policy` moves into `isaaclab_arena/evaluation/rollout.py`.
`run_execution.py` and `policy_runner.py` import it from there. The only
change to it: it reads `env.unwrapped.cfg.metrics` without `hasattr`,
because `IsaacLabArenaManagerBasedRLEnvCfg` always declares `metrics`.
- `get_policy_cls` is replaced by
`resolve_policy_type_from_name_or_class_path` in
`arena_experiment_config_loader.py`. It returns the policy class for a
registered name or a dotted class path.
`_resolve_policy_cfg_type_from_name_or_class_path`, which resolves
`policy.type` in typed YAML Experiments, already had the same logic and
now calls `resolve_policy_type_from_name_or_class_path`.
`legacy_eval_config.py` and `policy_runner.py` also call
`resolve_policy_type_from_name_or_class_path` in place of
`get_policy_cls`.
- `resolve_policy_type_from_name_or_class_path` does not print the
"Policy ... is not registered. Dynamically importing from path" message
that `get_policy_cls` printed.
- `test_rollout_policy.py` targets the new module.

## Validation

- Rebased onto `main` at `02a9b1e413`, after #1459. CI passed on the
earlier head `afc9e006cd`.
- After dropping the `hasattr` checks: `test_rollout_policy.py`,
`test_run_execution.py`, and
`test_experiment_runner.py::test_experiment_runner_from_typed_yaml`
pass.
- Locally, in the Arena Docker image built from `main`:
- `test_rollout_policy.py` (2 passed), `test_run_execution.py` (23),
`test_arena_experiment_config_loader.py` (26), `test_policy_cfgs.py`
(13), `test_legacy_eval_config.py` (6), and the `test_policy_runner.py`
deprecation test.
- Subprocess runs that start Isaac Sim:
`test_policy_runner.py::test_zero_action_policy`,
`test_experiment_runner.py::test_experiment_runner_from_typed_yaml`, and
`test_experiment_runner.py::test_experiment_runner_two_jobs_zero_action`
(legacy JSON) all pass.
- `pre-commit` passes.

---------

Signed-off-by: Clemens Volk <[email protected]>
cvolkcvolk added a commit that referenced this pull request Nov 26, 2026
Replace the `policy_runner.py` commands on the GR00T evaluation pages of
the sequential static manipulation and locomanipulation workflows with
`experiment_runner.py` and three new Experiment files. Replace the
sample outputs with output from running these Experiments.

## Why this change?

Experiments run with `experiment_runner.py` are becoming the only way to
evaluate, but these two tutorial pages still use `policy_runner.py`.
This is the follow-up promised in
[#1459](#1459).

The sample outputs were also out of date. On current `main`, the old
`policy_runner.py` command for the 10-environment sequential step
reaches a success rate of 0.73 over 45 episodes, where the page showed
0.98. The Experiment version reaches 0.83 over 46 episodes.

## What changes?

- `gr1_put_ranch_bottle_in_fridge_gr00t_experiment.yaml` has one Run for
Steps 1 and 2 of the sequential page. Step 2 sets 10 environments on the
command line with
`runs.gr1_put_ranch_bottle_in_fridge_and_close_door.environment_builder.num_envs=10`.
- `gr1_put_sauce_bottles_in_fridge_gr00t_experiment.yaml` replaces
`--object_set` in Step 3 with the asset selection variation. The Run
builds the scene once per bottle and reports a success rate for each
bottle. Before, each parallel environment held a different bottle and
the page showed one combined rate.
- `g1_locomanip_gr00t_experiment.yaml` has one Run for both
locomanipulation steps.
- Locomanipulation Step 2 now runs 1500 steps instead of 1200. An
episode times out after 1500 steps, so with 1200 steps the attempts that
timed out never counted. The old sample showed 1.0 over 2 episodes. With
1500 steps the same setup gives 0.5 over 6.
- The locomanipulation device note said the evaluation uses `--device
cpu`, but neither the old nor the new commands do. It now says the
commands run physics on the GPU, and that `--device cpu` switches to CPU
physics.
- Step 4 of the sequential page already used `experiment_runner.py`. Its
intro now builds on Steps 1 to 3.
- The removed Low Hardware Requirements tab was the only place that
mentioned `checkpoint-30000`. A sentence next to the server command now
says to serve that checkpoint after training with that option, because
that training also keeps `checkpoint-20000`.

## Validation

I ran every command on both pages in the Arena Docker image built from
`main`. The GR00T server ran from the Isaac-GR00T submodule with the
pre-trained checkpoints from Hugging Face. All Runs completed:

| Page step | Envs | Limit | Episodes | Success rate |
| --- | --- | --- | --- | --- |
| Sequential Step 1 | 1 | 2000 steps | 5 | 0.80 |
| Sequential Step 2 | 10 | 2000 steps | 46 | 0.83 |
| Sequential Step 3 | 10 | 40 episodes, 4 builds | 40 | 0.60 (ranch
dressing 0.8, ketchup 0.6, barbecue 0.5, mayonnaise 0.5) |
| Locomanipulation Step 1 | 1 | 1500 steps | 1 | 1.0 |
| Locomanipulation Step 2 | 5 | 1500 steps | 6 | 0.5 |

For comparison, the old `policy_runner.py` commands on `main` gave 0.73
over 45 episodes for sequential Step 2. For locomanipulation Step 2 at
1200 steps they gave 1.0 over 2 episodes, the same result as the
Experiment with those settings.

A 100-step locomanipulation run with `--device cpu` completed with the
environment on the CPU.

I did not re-run sequential Step 4, because its Experiment file and
command did not change.

After #1456 removed the metrics, I rebased onto `main` and re-rendered
the sample outputs in the new Run table format. The tables come from
`build_runs_info_table` and `build_categorical_variation_table` on
`main`, applied to the saved episode results of the runs above. The
numbers did not change. The three Experiment files load with `main`'s
loader, and the docs build with `-W` passes.

---------

Signed-off-by: Clemens Volk <[email protected]>
qianl-nv pushed a commit that referenced this pull request Dec 2, 2026
)

Cherry-pick #1459 into `release/0.4.0`, so v0.4 no longer documents
multi-GPU evaluation with `torchrun`, and `policy_runner.py
--distributed` prints a `FutureWarning`.

## Why this change?

`release/0.4.0` was cut from `main` two days before #1459 merged, so the
v0.4 docs still show the "Distribute Multi-GPU Evaluation" tabs on the
GR00T evaluation pages. The v0.4 VDR followed them and hit the problems
that #1459 gives as the reason to drop the feature: each rank writes to
its own output directory, and the report covers only some of the
episodes.

## What changes?

The same change as #1459:

- `policy_runner.py` warns when it gets `--distributed`. The shared
`--distributed` flag stays, because RL training with `train.py` uses it.
- The "Distribute Multi-GPU Evaluation" tabs are removed from
`step_5_evaluation.rst` in `sequential_static_manipulation` and
`locomanipulation`.
- The concept page on Experiments and the `run-experiment` skill no
longer send `torchrun` users to the Policy Runner.

The only conflict was in `test_policy_runner.py`, where the release
branch already has the viewport video tests in the same place. Both sets
of tests are kept, in the same order as on `main`.

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