Repository navigation
Cherry-pick: Deprecate multi-GPU evaluation with torchrun (#1459) - #1821
Conversation
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. `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`. - `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. - 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. --------- Signed-off-by: Clemens Volk <cvolk@nvidia.com> (cherry picked from commit 02a9b1e) Signed-off-by: Clemens Volk <cvolk@nvidia.com>
Confidence Score: 5/5
[Medium impact] This PR appears safe to merge. SummaryDeprecates multi-GPU evaluation without removing the shared
Reviews (1) · Last reviewed commit: "Deprecate multi-GPU evaluation with torc..." · Reviewed by Greptile |
🤖 Isaac Lab-Arena Review BotSummaryThis PR cherry-picks #1459 onto Findings🔵 Improvement: docs/pages/references/migration_guide_v0_4.rst:492: The v0.4.0 release notes and migration guide are already written on this branch, but neither mentions this deprecation. #1459 left the entry for "the next release's notes". After this cherry-pick, that release is v0.4.0. Other cherry-picks into this branch updated these pages in the same PR: #1732 and #1812 changed the migration guide, and #1806 changed the release notes. Could we add a bullet under "Runner behavior" in - ``policy_runner.py --distributed`` (multi-GPU evaluation with ``torchrun``) is deprecated and
prints a ``FutureWarning``. Ranks don't merge their metrics. Evaluate with more environments in
one process, or run Experiment Runs in parallel on OSMO (#1459).A matching line in the v0.4.0 section of Test Coverage and CI CostCI hadn't finished when this review was written. Pre-commit was still queued, and no test jobs had reported for VerdictShip it |
Cherry-pick #1459 into
release/0.4.0, so v0.4 no longer documents multi-GPU evaluation withtorchrun, andpolicy_runner.py --distributedprints aFutureWarning.Why this change?
release/0.4.0was cut frommaintwo 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.pywarns when it gets--distributed. The shared--distributedflag stays, because RL training withtrain.pyuses it.step_5_evaluation.rstinsequential_static_manipulationandlocomanipulation.run-experimentskill no longer sendtorchrunusers 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 onmain.