Skip to content

Support GR00T N1.7 through RLinf's native integration - #8258

Merged
ooctipus merged 2 commits into
isaac-sim:developfrom
ooctipus:feat/rlinf-gr00t-n17
Oct 3, 2026
Merged

ooctipus merged 2 commits into
isaac-sim:developfrom
ooctipus:feat/rlinf-gr00t-n17

Conversation

@ooctipus

@ooctipus ooctipus commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Extracts the GR00T N1.7 integration from Fanxing's #7776. This PR is independent of the H2 tasks, material changes, and action-chunk reset handling that remain there. Entrypoint and checkpoint changes already landed in #8250.

  • Keep RLinf's native N1.7 model/processor loader and the N1.5 custom-data loader.
  • Use one pinned RLinf revision for both models, with direct imports and explicit action registries. Existing RLinf 0.2 setups must rerun the shared installation step.
  • Let YAML declare the checkpoint's language key and environment action order. Existing defaults remain unchanged.
  • Document pinned N1.7 dependencies in a separate environment from N1.5.

No new runtime class, helper, compatibility fallback, or model-loading layer. Production changes are +14 / −17 lines. Existing tests are extended rather than adding a new test file.

Validation

  • 74 tests passed: 22 RLinf extension, 47 entrypoint, and 5 checkpoint-manifest tests.
  • The added language-key, action-order, and split-registry cases fail on unmodified develop and pass here. Removing the N1.7 guard also fails the native-loader ownership assertion.
  • Ran the unchanged RLinf simulation_io module and model dispatcher from pinned revision 0f9ea98c7a6d9e3ade24e8f4846c64d3b135dbcc with the extension. Checked conversion values, native N1.7 dispatch, and N1.5 custom-data loading; model loading was stubbed at the dependency boundary.
  • uv run --no-sync isaaclab -f and git diff --check passed. Documentation build is left to CI.
  • Full checkpoint inference and training were not run. This PR makes no throughput or task-success claim.

Type of change

  • New feature
  • Dependency update: RLinf 0.2 is no longer supported; installation and migration instructions are included
  • Documentation update

Release backport

  • Backport this pull request to the active release branch after it merges into develop

Checklist

  • Read the contribution guidelines
  • Ran formatting and lint checks
  • Updated documentation and added a package changelog fragment
  • Validated the changed behavior and applied the test-audit criteria
  • Contributor already listed in CONTRIBUTORS.md

@ooctipus
ooctipus requested a review from a team October 2, 2026 05:49
@ooctipus
ooctipus requested a review from kellyguo11 as a code owner October 2, 2026 05:49
@ooctipus

ooctipus commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Oct 2, 2026
@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Oct 2, 2026
@greptile-apps

greptile-apps Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium risk] Adds support for a new model version in the reinforcement learning integration.

The PR appears safe to merge, with non-blocking installation-documentation and test-coverage improvements recommended.

Findings

  1. P2 PyTorch3D omitted from N1.7 setup ▶
  2. P2 N1.5 import fallback untested ▶

Summary

This PR retains RLinf’s native N1.7 loader while supporting both N1.5 import layouts, registers converters across action-registry layouts, adds configurable language and action ordering, and documents a separate N1.7 installation.

  • The N1.7 installation instructions omit a dependency installed by the replaced steps.
  • The new N1.5 import fallback lacks direct test coverage.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  YAML[Task YAML] --> Register[Isaac Lab extension]
  Register --> Obs[Observation converter]
  Register --> Actions[Available action registries]
  Register --> Type{Model type}
  Type -->|gr00t_n1d7| Native[RLinf native model and processor loader]
  Type -->|N1.5 with data_config_class| Patched[Custom N1.5 loader]
Loading

Reviews (1) · Last reviewed commit: "Support GR00T N1.7 through RLinf's nativ..."

Comment on lines +132 to +136
uv pip install --no-deps \
"git+https://github.com/RLinf/RLinf.git@0f9ea98c7a6d9e3ade24e8f4846c64d3b135dbcc" \
"git+https://github.com/NVIDIA/Isaac-GR00T.git@1a1837f20538b7d7e21f977a11a5aee14f99803c" \
"transformers==4.57.3" "tokenizers>=0.22,<0.23"
uv pip install --no-deps --no-build-isolation "flash-attn==2.8.3"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 PyTorch3D omitted from N1.7 setup

These commands replace the step that installs PyTorch3D, and --no-deps prevents it from being installed automatically. Step 1 does not include it either. If this GR00T revision uses PyTorch3D transforms, a fresh N1.7 environment will lack a needed package. Include the installation step, or clarify why this revision does not need it.

Comment on lines +425 to +440
@pytest.mark.parametrize("model_type", ["gr00t", "gr00t_n1d7"])
def test_converters_registered(self, set_config_env, monkeypatch, model_type) -> None:
"""Register with either RLinf layout without replacing its native N1.7 loader."""
ext._load_full_cfg()["actor"] = {"model": {"model_type": model_type}}
gr00t = _rlinf_mocks["rlinf.models.embodiment.gr00t"]
native_loader = object()
monkeypatch.setattr(gr00t, "get_model", native_loader, raising=False)
sim_io = _rlinf_mocks["rlinf.models.embodiment.gr00t.simulation_io"]
assert "isaaclab" in sim_io.OBS_CONVERSION
assert "isaaclab" in sim_io.ACTION_CONVERSION
registry_names = ("ACTION_CONVERSION",)
if model_type == "gr00t_n1d7":
monkeypatch.delattr(sim_io, "ACTION_CONVERSION")
registry_names = ("ACTION_CONVERSION_N1D5", "ACTION_CONVERSION_N1D7")
for name in registry_names:
monkeypatch.setattr(sim_io, name, {}, raising=False)
# A leftover N1.5 setting must not bypass RLinf's model dispatcher.
ext._get_isaaclab_cfg()["data_config_class"] = "custom:DataConfig"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 N1.5 import fallback untested

The gr00t test case does not set data_config_class, so registration returns before the patched loader can exercise either new N1.5 import path. Test the flat and per-generation imports with that setting present; otherwise this compatibility change could regress without a test failure.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isaac Lab Review Bot

Adds GR00T N1.7 support through RLinf’s native loader, generation-specific converter registries, and configurable language/action mappings while preserving existing defaults. Before merge, fix the malformed RST heading underline, document that action_mapping.keys selects as well as orders action parts, and make the N1.5 loader test exercise the patch path it claims to verify.

  • Design and architecture: Keeping N1.7 model and processor loading inside RLinf avoids a duplicate loading layer, while the compatibility shim directly supports the legacy and per-generation registry layouts. No architectural issue was identified in the changed dispatch boundaries.
  • API: The added configuration surface consists of env.train.isaaclab.gr00t_mapping.language, action_mapping.keys, and recognition of actor.model.model_type == "gr00t_n1d7". The keys contract is currently documented only as ordering, although the implementation also filters out every action part not listed; document that the list must include every part intended for emission.
  • Compatibility and deprecation: Breaking changes: none identified. Existing configurations retain the prior language key and dictionary action order, model_type defaults to "gr00t", existing registry entries remain untouched through setdefault, and the N1.5 import falls back to the legacy RLinf path only when the generation-specific package is absent.
  • Implementation: The N1.7 guard preserves RLinf’s native loader, embodiment registration still occurs before the early return, and the narrowed ModuleNotFoundError handling avoids masking unrelated import failures. In the action converter, action_mapping.keys both reorders and selects entries, so omitted keys silently shorten the emitted action vector; the contract needs to state this exact behavior.
  • Style consistency: The added documentation generally follows the surrounding RST structure, but the underline beneath “Skipping flash-attn for N1.5” is one character shorter than the title and will produce a docutils warning. Add the missing tilde. The action-converter docstring should also describe the filtering semantics of keys.
  • Test quality: The language-key and action-order parameter rows exercise distinct new configuration behavior, and the converter-registration test covers both registry layouts. However, the model_type="gr00t" row leaves data_config_class empty, so its native-loader assertion passes through the pre-existing early return rather than verifying N1.5 patching. Configure data_config_class in both rows and assert that only the N1.7 row preserves the native loader.

Minor fixes needed. Posted 3 actionable findings inline.

Automated review; human maintainers own approval decisions.

Skipping flash-attn
~~~~~~~~~~~~~~~~~~~
Skipping flash-attn for N1.5
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Suggestion · Style Consistency — Section underline shorter than retitled heading

The retitled heading "Skipping flash-attn for N1.5" is 28 characters but the tilde underline on this line is 27, so docutils emits a "Title underline too short" warning during the documentation build. Add one tilde so the adornment matches the heading length, as the adjacent "GR00T N1.7" heading does.


Uses ``action_mapping`` from the YAML config (``env.train.isaaclab.action_mapping``)
to apply optional prefix/suffix zero-padding to the concatenated action vector.
to order action parts by ``keys`` and apply optional prefix/suffix zero-padding.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Suggestion · Implementation — Docstring omits that keys selects parts

action_mapping.get("keys", action_chunk) both orders and filters: any model action part not listed is dropped, silently shortening the action vector, and a misspelled entry raises a bare KeyError. The docstring (and the YAML example in the new documentation section) describe keys only as ordering. State that keys must list every action part to be emitted.

ext._get_isaaclab_cfg()["data_config_class"] = "custom:DataConfig"
ext.register()

assert gr00t.get_model is native_loader

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Suggestion · Test Quality — Native-loader assertion vacuous for gr00t row

The sample YAML sets no data_config_class, so for model_type="gr00t" _patch_gr00t_get_model returns at the if not data_config_class guard before reaching the new model_type check. The assertion then passes for an unrelated reason and nothing verifies that N1.5 still receives its patched loader. Set data_config_class for both rows and assert the gr00t row replaces get_model.

@ooctipus

ooctipus commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Oct 2, 2026
@ooctipus
ooctipus merged commit 728dc4a into isaac-sim:develop Oct 3, 2026
59 checks passed
@ooctipus
ooctipus deleted the feat/rlinf-gr00t-n17 branch October 14, 2026 14:28
StafaH added a commit that referenced this pull request Nov 16, 2026
…ort for assemble trocar (#8771)

# Description

This fixes two regressions affecting GR00T N1.5 RL post-training for the
G129 Dex3 assemble-trocar task.

1. **RLinf 0.3 compatibility after the integration update**
- The RLinf revision pinned by
[#8258](#8258) already
registers `new_embodiment` as projector 10, while the GR00T N1.5
checkpoint uses projector 31. Honor an explicitly configured
`embodiment_tag_id` instead of keeping the incompatible pre-registered
value.
- Add the patch-based weight syncer now required to synchronize updated
actor weights to the rollout worker during training.
- Give the stage-update reward term a non-zero weight because
`RewardManager` skips weight-zero terms entirely. Its function still
returns zero, so this does not alter the reward value.
- Use `uv` and install the build dependencies for the documented
flash-attn source build.

2. **G129 arm-motion regression from the actuator limit migration**
- The actuator refactor in
[#6839](#6839) changed the
G129 waist setting from `velocity_limit=0.0` to
`joint_velocity_limit=0.0`.
- The old implicit-actuator path ignored `velocity_limit=0.0`, but the
new field writes a hard zero-velocity limit to PhysX. This produced
alternating arm velocity/torque responses and made the arms move too
slowly to complete the task.
- Remove the zero solver limit so the waist retains the USD velocity
limit, restoring smooth arm tracking.

3. **PhysX and Newton support for the assemble-trocar task**
* PhysX stays the default; append `physics=newton_mjwarp` to `isaaclab
train/play --rl_library rlinf` to run on Newton. Other trailing
`KEY=VALUE` env overrides are forwarded the same way.
* Fix two Newton import issues in this scene (PhysX merged-mesh
colliders, negative collider scales) and select G1 joints by name, since
joint order differs per backend.

* The task now runs independently on either physics backend. PhysX
remains the default and its
settings are unchanged; Newton is selected with `physics=newton_mjwarp`,
and the
Newton-specific settings apply only when Newton is selected. With the
current Newton settings, we restarted PPO post-training from the SFT
checkpoint with `success_stage=3` (insertion) on 16 GPUs and trained for
about 120 steps
The training success rate rises steadily from 20.3% at the first step to
about 67% (5-step
moving average) after 122 steps.
<img width="1300" height="650"
alt="e811f225-f331-44b6-ae42-962e8c75e48d"
src="https://github.com/user-attachments/assets/b25d7556-ffb3-461a-af4f-26b884b2b1b1"
/>


## Videos

**PhysX Before Fix — zero waist velocity limit, 0/8 success**

<img width="896" height="336" alt="physx_before_fix"
src="https://github.com/user-attachments/assets/d24850a2-c623-4f26-942c-78c1d57a1fe9"
/>

**PhysX After Fix — zero waist velocity limit removed, 4/8 success**

<img width="896" height="336" alt="physx_after_fix"
src="https://github.com/user-attachments/assets/a83e35c8-0cd5-4999-a81d-97c100e50ed2"
/>

**Make Newton behaviour normal as PhysX by SFT model**

<img width="960" height="360" alt="sft_physx_newton_4x2"
src="https://github.com/user-attachments/assets/1cfa65d9-3bcf-40e6-b186-6e9e4a7ceb77"
/>


## Type of change

- Bug fix (non-breaking change which fixes an issue)
- Documentation update

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`uv run isaaclab --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have validated the changed behavior with focused coverage
- [x] I have added changelog fragments for the touched packages
- [x] My name already exists in `CONTRIBUTORS.md`

---------

Co-authored-by: Mustafa Haiderbhai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants