Skip to content

DOC FIX remove RandomErasing does not support PIL Images - #9431

Merged
zy1git merged 4 commits into
pytorch:mainfrom
turbotimon:doc-fix-9415
Mar 12, 2026
Merged

zy1git merged 4 commits into
pytorch:mainfrom
turbotimon:doc-fix-9415

Conversation

@turbotimon

Copy link
Copy Markdown
Contributor

remove RandomErasing "does not support PIL Images" because it does

closes #9415

@pytorch-bot

pytorch-bot Bot commented Mar 10, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 9 New Failures, 6 Unrelated Failures

As of commit 90b1453 with merge base 6d85459 (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

@meta-cla

meta-cla Bot commented Mar 10, 2026

Copy link
Copy Markdown

Hi @turbotimon!

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 [email protected]. Thanks!

@meta-cla meta-cla Bot added the cla signed label Mar 10, 2026
@zy1git

zy1git commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

@turbotimon Thanks for your contribution!

@zy1git
zy1git merged commit 6f131f1 into pytorch:main Mar 12, 2026
28 of 41 checks passed
@github-actions

Copy link
Copy Markdown

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


class RandomErasing(torch.nn.Module):
"""Randomly selects a rectangle region in a torch.Tensor image and erases its pixels.
This transform does not support PIL Image.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@zy1git this is the v1 docs, not v2. Please update v2 instead. Maybe v1 needs to be updated as well, but it's worth confirming first.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks a lot for pointing this out.
I investigated the v1 and it does not support PIL Image.
I have created this PR to fix this accordingly: #9440

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.

RandomErasing does support PIL Images

3 participants