Skip to content

Remove obsolete warp-to-torch migration helper#5924

Merged
AntoineRichard merged 6 commits into
isaac-sim:developfrom
AntoineRichard:antoine/remove-wrap-warp-to-torch
Jun 4, 2026
Merged

Remove obsolete warp-to-torch migration helper#5924
AntoineRichard merged 6 commits into
isaac-sim:developfrom
AntoineRichard:antoine/remove-wrap-warp-to-torch

Conversation

@AntoineRichard
Copy link
Copy Markdown
Collaborator

Summary

  • Removed scripts/tools/wrap_warp_to_torch.py, which is obsolete now that ProxyArray exposes explicit .torch access.
  • Removed the ProxyArray static scanner exemption for the deleted helper.
  • Added an isaaclab changelog fragment for the removal.

Test Plan

  • ./isaaclab.sh -p -m pytest source/isaaclab/test/test_scripts_torcharray_patterns.py
  • env PATH=/tmp/git-lfs-3.7.1/git-lfs-3.7.1:$PATH ./isaaclab.sh -f
  • rg -n "wrap_warp_to_torch|wrap_warp_to_py" docs --glob '!core' returned no matches

Closes #5057

Remove the migration script that wrapped data accessors with wp.to_torch after ProxyArray made the helper obsolete.

Keep the static scanner active by dropping the exemption for the removed script.
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Jun 2, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jun 2, 2026

Greptile Summary

This PR removes the now-obsolete scripts/tools/wrap_warp_to_torch.py migration helper that added wp.to_torch() wrappers around asset .data.* property accesses, and cleans up the ProxyArray hygiene test that had an explicit exclusion for that file.

  • Deletion of scripts/tools/wrap_warp_to_torch.py: The 648-line AST-based migration script is removed, as ProxyArray now exposes a direct .torch accessor making the script unnecessary.
  • Test cleanup in test_scripts_torcharray_patterns.py: Removes the _EXCLUDE set and its two guard checks that were skipping the now-deleted script from ProxyArray pattern scanning.
  • Changelog fragment added: Documents the removal and points users to the .torch accessor as the modern replacement.

Confidence Score: 5/5

Straightforward removal of a standalone migration script with no call sites remaining in the codebase.

The deleted file is a standalone CLI tool with no imports from library code — removing it cannot break any runtime paths. The test cleanup correctly mirrors the deletion: the _EXCLUDE set only ever contained that one file, and the two pytest.skip guards were gated on that set, so dropping them is safe. The _EXCLUDE_PREFIXES guard and the rest of the scan logic are untouched.

No files require special attention.

Important Files Changed

Filename Overview
scripts/tools/wrap_warp_to_torch.py 648-line migration helper deleted in full; obsoleted by ProxyArray.torch accessor.
source/isaaclab/test/test_scripts_torcharray_patterns.py Removes _EXCLUDE set and two pytest.skip guards that were specific to the now-deleted script; remaining scan logic is intact.
source/isaaclab/changelog.d/issue-5057-remove-wrap-warp-to-torch.rst New changelog fragment documenting the removal and pointing users to ProxyArray.torch.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["asset.data.field (returns ProxyArray)"]
    B["Old path: wp.to_torch(asset.data.field)"]
    C["New path: asset.data.field.torch"]
    D["wrap_warp_to_torch.py\n(DELETED)"]
    E["ProxyArray.torch accessor\n(modern replacement)"]

    A --> B
    A --> C
    B -.->|"automated via"| D
    C -->|"uses"| E
    D -.->|"removed — no longer needed"| X["❌"]
Loading

Reviews (1): Last reviewed commit: "chore: Remove obsolete warp-to-torch hel..." | Re-trigger Greptile

Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

🔍 Code Review Summary

Overall Assessment: ✅ Clean removal — low risk, well-scoped.

This PR correctly removes the obsolete wrap_warp_to_torch.py migration helper (648 lines) and cleans up its associated test exemption. The ProxyArray.torch accessor makes this utility redundant, and the author has verified no remaining references exist in the codebase.


Findings

1. ℹ️ Verify Sphinx cross-reference resolves (Nit)

File: source/isaaclab/changelog.d/issue-5057-remove-wrap-warp-to-torch.rst:5

  :attr:`~isaaclab.utils.warp.ProxyArray.torch` when tensor interop is needed.

Ensure :attr:\~isaaclab.utils.warp.ProxyArray.torch`resolves in the docs build — the "Build Latest Docs" CI job (currently pending) will confirm this. IfProxyArray.torchis a@Property, :attr:is correct; if it was changed to a method,:meth:` would be needed instead.

2. ✅ Test exemption cleanup is correct

The removal of the _EXCLUDE set and its two usage sites in test_scripts_torcharray_patterns.py is clean:

  • The variable is fully removed (no dangling references)
  • _EXCLUDE_PREFIXES (for contrib scope exclusion) is correctly preserved
  • Both test_no_wp_to_torch_on_torcharray_data and test_no_direct_proxyarray_data_methods now scan without special-casing, which strengthens regression coverage

3. ✅ No orphaned references

The author's rg search confirms no docs or source references remain to wrap_warp_to_torch. GitHub code search corroborates this.


CI Status

Most checks are still pending at review time. The key ones to watch:

  • "Build Latest Docs" — validates the changelog RST cross-reference (Finding 1)
  • "isaaclab (core)" — runs the modified test file

Verdict

Approve-worthy once CI is green. The only actionable item is a minor documentation cross-reference verification (Finding 1) which CI will catch automatically if broken.


Update (a6c0fd3): New commit is a rebase onto updated develop — no PR-scope changes. The actual PR diff (3 files) remains identical. Previous findings still apply; no new issues introduced.


Update (33fd6d2): Another rebase onto updated develop (v6.3.0 release train: version bumps, changelog consolidation, lazy_export conversions, Newton physics config tweaks). No changes to the PR-scoped files. Previous findings still apply; no new issues.


Update (dd4f273): New commit adds intersphinx fallback inventory for Isaac Sim docs in docs/conf.py. This is a sensible hardening measure — if the versioned 6.0.0/py/objects.inv temporarily 404s during docs publishing, Sphinx will fall back to latest/py/objects.inv. The tuple-based fallback syntax is correct per Sphinx 7.x intersphinx_mapping spec. This change also helps ensure Finding 1 (cross-reference resolution) passes reliably. ✅ No new issues.


Update (7000979): Rebase onto updated develop (ovphysx pinned to 0.4.13, intersphinx fallback simplified, camera demo subtitle fix, version-specific comments generalized in ovphysx tests). No changes to the PR-scoped files (still the same 3-file removal). Previous findings still apply; no new issues.

Add a fallback inventory for the Isaac Sim intersphinx mapping so transient versioned docs inventory 404s do not fail the docs build while warnings are treated as errors.

Keep generated links targeting the 6.0.0 Python docs and use the latest Python inventory only as a secondary lookup source.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 4, 2026
The isaacsim intersphinx fallback inventory in docs/conf.py is
unrelated to removing the obsolete warp-to-torch migration helper.
Drop it from this PR so the change stays focused; the 404 fallback
workaround, if desired, belongs in its own change.
@AntoineRichard AntoineRichard merged commit ac7fd8a into isaac-sim:develop Jun 4, 2026
37 checks passed
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Jun 4, 2026
## Summary

- Removed `scripts/tools/wrap_warp_to_torch.py`, which is obsolete now
that `ProxyArray` exposes explicit `.torch` access.
- Removed the ProxyArray static scanner exemption for the deleted
helper.
- Added an `isaaclab` changelog fragment for the removal.

## Test Plan

- [x] `./isaaclab.sh -p -m pytest
source/isaaclab/test/test_scripts_torcharray_patterns.py`
- [x] `env PATH=/tmp/git-lfs-3.7.1/git-lfs-3.7.1:$PATH ./isaaclab.sh -f`
- [x] `rg -n "wrap_warp_to_torch|wrap_warp_to_py" docs --glob '!core'`
returned no matches

Closes isaac-sim#5057
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