Remove obsolete warp-to-torch migration helper#5924
Conversation
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.
Greptile SummaryThis PR removes the now-obsolete
Confidence Score: 5/5Straightforward 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
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["❌"]
Reviews (1): Last reviewed commit: "chore: Remove obsolete warp-to-torch hel..." | Re-trigger Greptile |
There was a problem hiding this comment.
🔍 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_dataandtest_no_direct_proxyarray_data_methodsnow 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.
Summary
scripts/tools/wrap_warp_to_torch.py, which is obsolete now thatProxyArrayexposes explicit.torchaccess.isaaclabchangelog fragment for the removal.Test Plan
./isaaclab.sh -p -m pytest source/isaaclab/test/test_scripts_torcharray_patterns.pyenv PATH=/tmp/git-lfs-3.7.1/git-lfs-3.7.1:$PATH ./isaaclab.sh -frg -n "wrap_warp_to_torch|wrap_warp_to_py" docs --glob '!core'returned no matchesCloses #5057