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

Add pathlib.Path support for image IO utils #8314

Merged
merged 5 commits into from
Mar 17, 2024

Conversation

NicolasHug
Copy link
Member

Towards #8120
Needs #8313 to be merged first

Copy link

pytorch-bot bot commented Mar 13, 2024

🔗 Helpful Links

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

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

❌ 16 New Failures, 2 Pending, 18 Unrelated Failures

As of commit de684f0 with merge base 2bababf (image):

NEW FAILURES - The following jobs have failed:

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 changed the title Add torchscript test for io image stuff Add pathlib.Path support for image IO utils Mar 13, 2024
@NicolasHug NicolasHug requested review from vfdev-5 and pmeier March 13, 2024 16:24
@@ -42,14 +42,14 @@ def read_file(path: str) -> torch.Tensor:
with one dimension.

Args:
path (str): the path to the file to be read
path (str or ``pathlib.Path``): the path to the file to be read
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that we can't change the type signatures because of torchscript.

@NicolasHug NicolasHug merged commit 4028d9f into pytorch:main Mar 17, 2024
2 of 5 checks passed
@NicolasHug NicolasHug mentioned this pull request Mar 18, 2024
facebook-github-bot pushed a commit that referenced this pull request Mar 21, 2024
Reviewed By: vmoens

Differential Revision: D55062764

fbshipit-source-id: d0a7c100088ce6990a557c857edfda9f8c9284ff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: done
Development

Successfully merging this pull request may close these issues.

3 participants