Skip to content

Improving tv_tensors wrap API for extensibility.#9398

Open
gabrielfruet wants to merge 16 commits intopytorch:mainfrom
gabrielfruet:feat/extend-wrap
Open

Improving tv_tensors wrap API for extensibility.#9398
gabrielfruet wants to merge 16 commits intopytorch:mainfrom
gabrielfruet:feat/extend-wrap

Conversation

@gabrielfruet
Copy link
Copy Markdown
Contributor

@gabrielfruet gabrielfruet commented Feb 20, 2026

Addresses #9333

Adopt a method-based wrapping, enabling user to extend functionality on subclasses of TVTensor.

This is the pythonic approach, since we have many built-ins that rely on this on pattern (e.g len, iter, next ...)

This does not break backwards compatibility.

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Feb 20, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/9398

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the cla signed label Feb 20, 2026
@gabrielfruet gabrielfruet changed the title Improving tv_tensors wrap API for extensability. Improving tv_tensors wrap API for extensibility. Feb 22, 2026
Copy link
Copy Markdown
Contributor

@zy1git zy1git left a comment

Choose a reason for hiding this comment

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

@gabrielfruet Thanks a lot for the PR. I left two comments.

it seems that there are some test failures which need to be addressed. If you are still working on this PR, feel free to convert it to a draft. When the PR is ready to be reviewed, just convert it back.

Comment thread torchvision/tv_tensors/__init__.py Outdated
Comment thread torchvision/tv_tensors/_bounding_boxes.py Outdated
@gabrielfruet gabrielfruet marked this pull request as draft February 25, 2026 11:27
@gabrielfruet gabrielfruet marked this pull request as ready for review March 31, 2026 22:36
@gabrielfruet gabrielfruet requested a review from zy1git March 31, 2026 22:36
@gabrielfruet
Copy link
Copy Markdown
Contributor Author

@zy1git I think the PR is done. CI is red, but the errors are not related to my changes to my understanding.

Copy link
Copy Markdown
Contributor

@zy1git zy1git left a comment

Choose a reason for hiding this comment

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

@gabrielfruet Thanks a lot for this PR! I reviewed and left some comments. Feel free to take a look and address them.

Comment thread torchvision/tv_tensors/__init__.py Outdated
Comment thread torchvision/tv_tensors/__init__.py Outdated
Comment thread torchvision/tv_tensors/_bounding_boxes.py
Comment thread torchvision/tv_tensors/_keypoints.py
@gabrielfruet
Copy link
Copy Markdown
Contributor Author

@zy1git Thanks for the comments. I was able to fix all.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants