Skip to content

add warning for CelebA bbox data#9339

Merged
zy1git merged 11 commits intopytorch:mainfrom
ribbon-otter:myfork
Feb 9, 2026
Merged

add warning for CelebA bbox data#9339
zy1git merged 11 commits intopytorch:mainfrom
ribbon-otter:myfork

Conversation

@ribbon-otter
Copy link
Copy Markdown
Contributor

Until Issue 9008 is fixed, CelebA bbox data is broken, and a warning should be included so future people don't waste time trying to get the math correct to display the bboxes on the the faces.

I struggled trying to build the documentation locally (sphinx/config.py complains that there is no module named torchvision), so I plan on looking at the build artifact of the CI, to see if my formatting worked.

Until [Issue 9008](pytorch#9008) is fixed,
CelebA bbox data is broken, and a warning should be included so future people
don't waste time trying to get the math correct to display the bboxes on the
the faces.
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Jan 14, 2026

🔗 Helpful Links

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

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
Copy link
Copy Markdown

meta-cla bot commented Jan 14, 2026

Hi @ribbon-otter!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@ribbon-otter ribbon-otter marked this pull request as draft January 14, 2026 21:09
@meta-cla meta-cla bot added the cla signed label Jan 14, 2026
@meta-cla
Copy link
Copy Markdown

meta-cla bot commented Jan 14, 2026

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@ribbon-otter
Copy link
Copy Markdown
Contributor Author

since I didn't get docs to build on my computer and IC seems to also not run. I plan on abandoning this pull request, unless someone has a suggestion for what I should do.

@zy1git
Copy link
Copy Markdown
Contributor

zy1git commented Jan 17, 2026

@ribbon-otter Thanks a lot for your contribution! Your PR gets the docs built in preview mode. You can view the built docs by accessing the pytorch-bot comment: #9339 (comment)

There is a link called “ Preview Python docs built from this PR” And you can go do the “Datasets” on the left and search the keyword “CelebA” to check the rendering.

The issue was that the warning was written using Markdown syntax but TorchVision documentation requires reStructuredText (RST) format. Thus I will suggest that we can add a warning message in the correct format:

- ``bbox`` (Tensor shape=(4,) dtype=int): bounding box (x, y, width, height)

  .. warning::

      These bounding box coordinates correspond to the original uncropped
      CelebA images, not the cropped and aligned images returned by this
      dataset. As a result, the coordinates will not match and may fall
      outside the image boundaries.

      See `Issue #9008 <https://github.com/pytorch/vision/issues/9008>`_ for
      details and potential workarounds.

Note: The indentation matters for RST - the .. warning:: directive and its content need to be indented correctly relative to the bbox bullet point. Please check the docs preview after committing to verify it renders correctly.

Feel free to let us know if you have any questions.

@ribbon-otter
Copy link
Copy Markdown
Contributor Author

ribbon-otter commented Jan 20, 2026

oh thank you so much for you help. My issue was that I underestimating how long it would take for the tests to run, and apparently misinterpreted their in progress status as an error. And thank you for telling me about RST. I had looked in the pytorch dev documentation but I didn't find any hints for what the formatting language was, and so guessed at markdown. Looking up what was common python documentation formats would have been a good idea.

@zy1git zy1git marked this pull request as ready for review January 22, 2026 17:22
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 a lot for the PR @ribbon-otter and @zy1git for the review

@zy1git zy1git merged commit 6940e19 into pytorch:main Feb 9, 2026
3 checks passed
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 9, 2026

Hey @zy1git!

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.

3 participants