Skip to content

Remove obsolete warp-to-torch migration helper#5924

Open
AntoineRichard wants to merge 2 commits into
isaac-sim:developfrom
AntoineRichard:antoine/remove-wrap-warp-to-torch
Open

Remove obsolete warp-to-torch migration helper#5924
AntoineRichard wants to merge 2 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants