refactor(retargeting): rename HeadPose tensor type to HeadInput - #862
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe standard head tensor factory and index enum are renamed from Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
The DeviceIO source tensor types are named after the input they carry -- HandInput, ControllerInput, FullBodyInput, Generic3AxisPedalInput -- with HeadPose the lone exception. Rename it, and HeadPoseIndex alongside it, so the set is consistent. HeadPose and HeadPoseIndex stay available as deprecated aliases through the module's existing __getattr__, so graphs referring to them keep working and warn rather than break. Only the tensor group type moves: the FlatBuffers table in head.fbs is still called HeadPose, and the group's fields are unchanged. Signed-off-by: Andrei Aristarkhov <aaristarkhov@nvidia.com>
The rename added deprecated aliases only to the tensor_types package __init__, but examples and downstream code import through the submodule paths (tensor_types.indices, tensor_types.standard_types), which had no aliases and raised ImportError. - indices.py: add HeadPoseIndex -> HeadInputIndex to _DEPRECATED_ALIASES - standard_types.py: add the _DEPRECATED_ALIASES/__getattr__ pair with HeadPose -> HeadInput, mirroring the existing pattern - deviceio_source_nodes/interface.py: fix stale docstring reference - test_tensor_group.py: cover both package- and submodule-level aliases Signed-off-by: Andrei Aristarkhov <aaristarkhov@nvidia.com>
4021ea2 to
6d6c87a
Compare
Motivation
HeadPosewas ambiguous: the name is also used by the FlatBuffer schema (core::HeadPose,HeadPoseTrackedT,HeadPoseRecord), which is an unrelated concept. Renaming the retargeting tensor type toHeadInputmatches the siblingHandInputnaming and removes the collision.Changes
HeadPose→HeadInputandHeadPoseIndex→HeadInputIndex, updating all call sites. FlatBuffer schema names are deliberately untouched.tensor_typespackage level and thetensor_types.indices/tensor_types.standard_typessubmodule paths — the latter is the path the repo's own examples import through, so it needs the shim too.deviceio_source_nodes/interface.pythat still listed the format asHeadPose.TestDeprecatedHeadAliasescovering both alias paths, mirroringTestDeprecatedPicoAliasesfrom the earlier...Picorename.Testing
cmake --preset py3.12 -DCMAKE_BUILD_TYPE=Release+cmake --build --preset py3.12.ctest --output-on-failure --parallel: 309/309 passed locally (GPU/OpenXR tests skip without an HMD). Local run covers Release / py3.12 / x64 only; CI covers the rest of the matrix.SKIP=check-copyright-year pre-commit run --all-files: clean.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
HeadInputfor clearer terminology.Bug Fixes
Tests