Repository navigation
Support GR00T N1.7 through RLinf's native integration - #8258
Conversation
|
run-ci |
|
| 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" |
There was a problem hiding this comment.
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.
| @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" |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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 ofactor.model.model_type == "gr00t_n1d7". Thekeyscontract 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_typedefaults to"gr00t", existing registry entries remain untouched throughsetdefault, 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
ModuleNotFoundErrorhandling avoids masking unrelated import failures. In the action converter,action_mapping.keysboth 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 leavesdata_config_classempty, so its native-loader assertion passes through the pre-existing early return rather than verifying N1.5 patching. Configuredata_config_classin 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 | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
There was a problem hiding this comment.
🔵 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. |
There was a problem hiding this comment.
🔵 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 |
There was a problem hiding this comment.
🔵 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.
|
run-ci |
…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]>
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.
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
simulation_iomodule and model dispatcher from pinned revision0f9ea98c7a6d9e3ade24e8f4846c64d3b135dbccwith 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 -fandgit diff --checkpassed. Documentation build is left to CI.Type of change
Release backport
developChecklist
CONTRIBUTORS.md