Skip to content

Added 'test' split support for Places365 dataset #8928

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

Merged
merged 4 commits into from
Feb 24, 2025

Conversation

rbngz
Copy link
Contributor

@rbngz rbngz commented Feb 20, 2025

Closes #8741

The Places365 test-split does not contain labels. As a result, the returned target value is None for this case.

An alternative approach could be to return only the image without a corresponding target, either as a single value or as a tuple with a single item.

Copy link

pytorch-bot bot commented Feb 20, 2025

🔗 Helpful Links

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

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.

@facebook-github-bot
Copy link

Hi @rbngz!

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!

@facebook-github-bot
Copy link

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

@rbngz rbngz force-pushed the places365-test-set branch from 05cd13e to c6052ed Compare February 21, 2025 05:21
@NicolasHug
Copy link
Member

Thanks @rbngz , this looks good, can you please try to address the typing issue: https://github.com/pytorch/vision/actions/runs/13450604526/job/37606910832?pr=8928

  torchvision/datasets/places365.py:134: error: Incompatible return value type
  (got "tuple[str, int | None]", expected "tuple[str, int]")  [return-value]
                  return path.join(self.images_dir, image.lstrip(sep).replac...
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
  torchvision/datasets/places365.py:134: error: Item "None" of "str | None" has
  no attribute "lstrip"  [union-attr]
                  return path.join(self.images_dir, image.lstrip(sep).replac...
                                                    ^~~~~~~~~~~~
  Found 2 errors in 1 file (checked 235 source files)

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

Thank you @rbngz

@NicolasHug NicolasHug merged commit d462da2 into pytorch:main Feb 24, 2025
1 check passed
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.

split argument of Places365() should accept "test"
3 participants