Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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
Contributor

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
Contributor

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
facebook-github-bot pushed a commit that referenced this pull request Jul 28, 2025
Summary: Co-authored-by: Nicolas Hug <[email protected]>

Reviewed By: scotts

Differential Revision: D77997055

fbshipit-source-id: 99206061f1a65dac63813368d8837ac1f8498207
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