Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow decode_image to support paths #8624

Merged
merged 2 commits into from
Sep 3, 2024

Conversation

NicolasHug
Copy link
Member

I assume we needed both decode_image and read_image back then when torchscript didn't support Union. But now that it does, it doesn't make much sense to have both.

This PR allows decode_image to support paths (as strings and Pathlib.Path), on top of tensors. read_image is now marked as obsolete. I'm not deprecating it, it's not worth the effort.

Copy link

pytorch-bot bot commented Sep 3, 2024

🔗 Helpful Links

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

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

✅ You can merge normally! (3 Unrelated Failures)

As of commit 0aa8a31 with merge base c36025a (image):

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

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

@NicolasHug NicolasHug merged commit d0ebeb5 into pytorch:main Sep 3, 2024
70 of 74 checks passed
@NicolasHug NicolasHug deleted the decode_image_union branch September 3, 2024 16:30
facebook-github-bot pushed a commit that referenced this pull request Sep 13, 2024
Reviewed By: vmoens

Differential Revision: D62581687

fbshipit-source-id: 4971f96c4e8623855fea52dc0fa1b896d01592de
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