Repository navigation
Fixes branch name in docs - #5953
Conversation
There was a problem hiding this comment.
Review — PR #5953: Fixes branch name in docs
Summary
The documentation extension change (docs/_extensions/isaaclab_docs.py) correctly addresses the stated goal: multiversion docs now use smv_current_version so that each versioned page shows the correct branch in clone commands, with a sensible fallback to isaaclab_latest_branch.
However, this PR appears to bundle unrelated changes alongside the docs fix:
Observations
1. docs/_extensions/isaaclab_docs.py ✅
The logic is clean — prioritize smv_current_version (set by sphinx-multiversion), fall back to isaaclab_latest_branch. The docstring update from "release branch" to "branch or tag" is accurate.
2. docs/source/features/multi_gpu.rst ⚠️ Unrelated content
A new "Troubleshooting NCCL Errors" section is added. While useful, this is unrelated to the branch-name fix described in the PR title/description.
3. source/isaaclab_rl/isaaclab_rl/rsl_rl/utils.py ⚠️ Unrelated code change
A new handle_deprecated_rsl_rl_checkpoint() function is added to convert pre-5.0 rsl-rl checkpoints to the new split actor/critic layout. This is production code unrelated to the docs fix.
Code quality note: The implementation itself looks solid — proper version gating, clear key remapping logic, sibling file output to avoid overwriting the original, and a helpful error message for unrecognized keys.
4. source/isaaclab_rl/test/test_rsl_rl_cfg_deprecation.py ⚠️ Unrelated tests
Tests for the checkpoint conversion utility above. Well-structured (covers conversion, passthrough for new layout, passthrough for old rsl-rl, and error case).
Recommendation
The PR title and description only mention the branch-name fix, but 3 of the 4 changed files are unrelated (NCCL troubleshooting docs + rsl-rl checkpoint migration utility). Consider either:
- Updating the PR description to cover all changes, or
- Splitting the unrelated changes into separate PRs for clearer review history
CI Status
- ✅ pre-commit, Build Wheel, Check for Broken Links — passing
- ❌ Check changelog fragments — failing (expected: no changelog fragment added)
- ⏳ Several checks still pending (docs build, installation tests)
No blocking issues found in the code itself.
Update (c2aa03e)
✅ Addressed: The unrelated changes (NCCL troubleshooting docs, handle_deprecated_rsl_rl_checkpoint utility, and associated tests) have been removed from this PR. The PR now contains only the docs branch-name fix as described in the title.
No new issues found. LGTM 👍
Greptile SummaryThis PR bundles three distinct changes: the documented fix that makes multiversion Sphinx builds use
Confidence Score: 4/5Safe to merge; the core docs fix is straightforward and the new checkpoint converter is well-tested, with only minor hardening opportunities. The branch-name fix in the Sphinx extension is a clean, targeted change. The checkpoint converter introduces weights_only=False unconditionally (a well-known PyTorch footgun for untrusted files) and writes the converted file without an existence check, which could cause a partial-read race under concurrent callers. Neither is blocking, but both are worth addressing before wider adoption of the utility. source/isaaclab_rl/isaaclab_rl/rsl_rl/utils.py — the new handle_deprecated_rsl_rl_checkpoint function around the torch.load call and the output-file write. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[handle_deprecated_rsl_rl_checkpoint called] --> B{installed_version < 5.0?}
B -- Yes --> C[Return checkpoint_path unchanged]
B -- No --> D[torch.load checkpoint]
D --> E{Is dict AND has model_state_dict AND lacks actor_state_dict?}
E -- No --> F[Return checkpoint_path unchanged]
E -- Yes --> G[Iterate model_state_dict keys]
G --> H{key == 'std'?}
H -- Yes --> I[actor_state_dict: distribution.std_param]
H -- No --> J{key starts with 'actor.'?}
J -- Yes --> K[actor_state_dict: mlp.X]
J -- No --> L{key starts with 'critic.'?}
L -- Yes --> M[critic_state_dict: mlp.X]
L -- No --> N[raise ValueError]
I & K & M --> O[Build converted dict]
O --> P[torch.save to _rslrl5 path]
P --> Q[Return converted_path]
Reviews (1): Last reviewed commit: "Fixes branch name in docs" | Re-trigger Greptile |
| if version.parse(str(installed_version)) < _V5_0_0: | ||
| return checkpoint_path | ||
|
|
||
| loaded = torch.load(checkpoint_path, weights_only=False, map_location="cpu") |
There was a problem hiding this comment.
Using
weights_only=False allows arbitrary Python code to execute during unpickling if the checkpoint file is malicious or tampered with. For legacy checkpoints that only contain tensors and built-in Python types (dicts, lists, ints), PyTorch's weights_only=True can still load them safely in recent versions. Falling back to weights_only=False only when the first attempt fails would prevent silent arbitrary-code-execution on any checkpoint path accepted from user input.
| loaded = torch.load(checkpoint_path, weights_only=False, map_location="cpu") | |
| try: | |
| loaded = torch.load(checkpoint_path, weights_only=True, map_location="cpu") | |
| except Exception: | |
| loaded = torch.load(checkpoint_path, weights_only=False, map_location="cpu") |
| root, ext = os.path.splitext(checkpoint_path) | ||
| converted_path = f"{root}_rslrl5{ext}" | ||
| torch.save(converted, converted_path) | ||
| print(f"[INFO]: Converted deprecated rsl-rl checkpoint to '{converted_path}'.") |
There was a problem hiding this comment.
No idempotency guard on the output file
The function unconditionally overwrites converted_path every time it is called. While the conversion is deterministic so overwriting is safe for a single process, if two workers simultaneously convert the same checkpoint one may read a partially-written file from the other. A lightweight guard — checking whether converted_path already exists before calling torch.save — would make the function safe under concurrent usage (e.g., multi-process data loaders or parallel eval runs).
# Description Fixes issue in built docs where doc names in clone command didn't follow the actual version of the doc. Previously, when develop triggered a multiversion docs deploy, even the release/3.0.0-beta2 generated pages used develop. Now: - multiversion docs use smv_current_version - single-version/local docs fall back to isaaclab_latest_branch ## Type of change - 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 `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there <!-- As you go through the checklist above, you can mark something as done by putting an x character in it For example, - [x] I have done this task - [ ] I have not done this task --> # Description <!-- Thank you for your interest in sending a pull request. Please make sure to check the contribution guidelines. Link: https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html 💡 Please try to keep PRs small and focused. Large PRs are harder to review and merge. --> Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. Fixes # (issue) <!-- As a practice, it is recommended to open an issue to have discussions on the proposed pull request. This makes it easier for the community to keep track of what is being developed or added, and if a given feature is demanded by more than one party. --> ## Type of change <!-- As you go through the list, delete the ones that are not applicable. --> - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) - Breaking change (existing functionality will not work without user modification) - Documentation update ## Screenshots Please attach before and after screenshots of the change if applicable. <!-- Example: | Before | After | | ------ | ----- | | _gif/png before_ | _gif/png after_ | To upload images to a PR -- simply drag and drop an image while in edit mode and it should upload the image directly. You can then paste that source into the above before/after sections. --> ## Checklist - [ ] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there <!-- As you go through the checklist above, you can mark something as done by putting an x character in it For example, - [x] I have done this task - [ ] I have not done this task -->
Description
Fixes issue in built docs where doc names in clone command didn't follow the actual version of the doc.
Previously, when develop triggered a multiversion docs deploy, even the release/3.0.0-beta2 generated pages used develop.
Now:
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there