Skip to content

Document batch-less mode support in box_convert#9324

Merged
NicolasHug merged 2 commits intopytorch:mainfrom
raimbekovm:fix/box-convert-docstring-variadic
Jan 5, 2026
Merged

Document batch-less mode support in box_convert#9324
NicolasHug merged 2 commits intopytorch:mainfrom
raimbekovm:fix/box-convert-docstring-variadic

Conversation

@raimbekovm
Copy link
Copy Markdown
Contributor

Summary

Fixes #4815

The box_convert function supports single boxes without batch dimension (e.g., Tensor[4]), but the docstring only documented Tensor[N, K] which implies a required batch dimension.

Changes

Updated the docstring to use Tensor[..., K] notation (consistent with other functions in the same file like clip_boxes_to_image, box_area, box_iou) to indicate that any number of leading batch dimensions is supported, including zero.

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Jan 1, 2026

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 5 New Failures

As of commit 9b60f76 with merge base aa35ca1 (image):

NEW FAILURES - The following jobs have failed:

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

@meta-cla meta-cla bot added the cla signed label Jan 1, 2026
Copy link
Copy Markdown
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

Thanks @raimbekovm

@NicolasHug NicolasHug merged commit 269805e into pytorch:main Jan 5, 2026
3 checks passed
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 5, 2026

Hey @NicolasHug!

You merged this PR, but no labels were added.
The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py

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.

[docs] box_convert seems to support batch-less mode as well, but this is not documented

2 participants