Repository navigation
Fix RLinf playback checkpoint selectors and update the VLA post-training guide #9155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ooctipus
merged 2 commits into
isaac-sim:main
from
Fanxing-LI:fansing/rlinf_docs_checkpoint_links
Nov 26, 2026
+66
−44
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
source/isaaclab_rl/changelog.d/rlinf-play-checkpoint-selectors.fixed.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| * Resolved ``--checkpoint latest`` and ``best`` in RLinf playback against the training task id recorded in | ||
| run manifests, so recipes with a separate evaluation task id find their checkpoints. | ||
| * Resolved a relative RLinf ``--config_path`` to an absolute directory, which Hydra requires. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -512,9 +512,13 @@ def test_rlinf_rejects_pretrained_checkpoint() -> None: | |
| resolve_rlinf_checkpoint("pretrained", log_root_path="logs/rlinf", task="Isaac-Task", config_name="ppo") | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("backend", [train_rlinf, play_rlinf], ids=["train", "play"]) | ||
| def test_rlinf_launch_passes_checkpoint_and_model_config_to_workers(tmp_path: Path, monkeypatch, backend) -> None: | ||
| """Real CLI composition supplies the native RLinf weight/resume hooks before workers start.""" | ||
| def test_rlinf_launch_passes_checkpoint_and_model_config_to_workers(tmp_path: Path, monkeypatch) -> None: | ||
| """Real CLI composition supplies the native RLinf weight/resume hooks before workers start. | ||
|
|
||
| The config directory is given relative to the working directory. Training records its run manifest, and | ||
| playback resolves ``latest`` through that manifest although the recipe's eval task id differs from its | ||
| training id. | ||
| """ | ||
| validate = mock.Mock(side_effect=RuntimeError("worker boundary")) | ||
| modules = { | ||
| "rlinf": {}, | ||
|
|
@@ -534,34 +538,44 @@ def test_rlinf_launch_passes_checkpoint_and_model_config_to_workers(tmp_path: Pa | |
| monkeypatch.chdir(tmp_path) | ||
| for variable in ("PYTHONPATH", "RLINF_CONFIG_FILE", "RLINF_EXT_MODULE", "RAY_ENABLE_UV_RUN_RUNTIME_ENV"): | ||
| monkeypatch.delenv(variable, raising=False) | ||
| step_dir = tmp_path / "checkpoints" / "global_step_400" | ||
| weights = step_dir / "actor" / "model_state_dict" / "full_weights.pt" | ||
| weights.parent.mkdir(parents=True) | ||
| weights.touch() | ||
| cfg = OmegaConf.create( | ||
| { | ||
| "runner": {"logger": {"log_path": "unused"}}, | ||
| "actor": { | ||
| "model": {"model_path": "./base", "model_type": "gr00t", "rl_head_config": {"add_value_head": True}} | ||
| }, | ||
| "rollout": {"model": {"model_path": "./rollout", "rl_head_config": {"disable_dropout": True}}}, | ||
| "env": {"train": {"init_params": {"id": "Test"}}, "eval": {"init_params": {"id": "Test"}}}, | ||
| "env": {"train": {"init_params": {"id": "Test"}}, "eval": {"init_params": {"id": "Test-Eval"}}}, | ||
| } | ||
| ) | ||
| OmegaConf.save(cfg, tmp_path / "ppo.yaml") | ||
| checkpoint = step_dir if backend is train_rlinf else weights | ||
| args = ["--config_path", str(tmp_path), "--config_name", "ppo"] | ||
| args += ["--checkpoint", str(checkpoint.relative_to(tmp_path))] | ||
| with pytest.raises(RuntimeError, match="worker boundary"): | ||
| backend.run(args) | ||
| GlobalHydra.instance().clear() | ||
|
|
||
| def launch(backend, checkpoint: str): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Warning · Style Consistency — Annotate the new launch helper The helper omits its backend parameter and return annotations, contrary to the signature-typing rule. Annotate the module argument and composed configuration return value. |
||
| with pytest.raises(RuntimeError, match="worker boundary"): | ||
| backend.run(["--config_path", ".", "--config_name", "ppo", "--checkpoint", checkpoint]) | ||
| GlobalHydra.instance().clear() | ||
| resolved = validate.call_args.args[0] | ||
| assert resolved.actor.model.model_path == str(tmp_path / "base") | ||
| assert resolved.rollout.model.model_path == str(tmp_path / "rollout") | ||
| assert resolved.rollout.model.model_type == "gr00t" | ||
| assert dict(resolved.rollout.model.rl_head_config) == {"add_value_head": True, "disable_dropout": True} | ||
| return resolved | ||
|
|
||
| resume_dir = tmp_path / "previous" / "global_step_400" | ||
| resume_weights = resume_dir / "actor" / "model_state_dict" / "full_weights.pt" | ||
| resume_weights.parent.mkdir(parents=True) | ||
| resume_weights.touch() | ||
| trained = launch(train_rlinf, str(resume_dir.relative_to(tmp_path))) | ||
| assert os.environ["RAY_ENABLE_UV_RUN_RUNTIME_ENV"] == "0" | ||
| resolved = validate.call_args.args[0] | ||
| assert resolved.runner["resume_dir" if backend is train_rlinf else "ckpt_path"] == str(checkpoint) | ||
| assert resolved.actor.model.model_path == str(tmp_path / "base") | ||
| assert resolved.rollout.model.model_path == str(tmp_path / "rollout") | ||
| assert resolved.rollout.model.model_type == "gr00t" | ||
| assert dict(resolved.rollout.model.rl_head_config) == {"add_value_head": True, "disable_dropout": True} | ||
| assert trained.runner.resume_dir == str(resume_dir) | ||
|
|
||
| # the training launch above created the only manifested run; RLinf saves checkpoints below its run directory | ||
| (run_dir,) = (tmp_path / "logs" / "rlinf").iterdir() | ||
| weights = run_dir / "checkpoints" / "global_step_8" / "actor" / "model_state_dict" / "full_weights.pt" | ||
| weights.parent.mkdir(parents=True) | ||
| weights.touch() | ||
| played = launch(play_rlinf, "latest") | ||
| assert played.runner.ckpt_path == str(weights) | ||
|
|
||
|
|
||
| def test_run_backend_restores_sys_argv_after_training(monkeypatch) -> None: | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Warning · Implementation — Separate the optional flash-attn install
The N1.7 command block still installs flash-attn when followed as written, failing without CUDA 13 nvcc despite the stated SDPA fallback. Put the install in a clearly optional step.