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

Skip to content

Conversation

NicolasHug
Copy link
Member

This silences these 2 mypy errors:

  torchvision/prototype/utils/_internal.py:102: error: Argument 1 to "memoryview"
  has incompatible type "ndarray[Any, Any]"; expected "Buffer"  [arg-type]
              self._memory = memoryview(tensor.numpy())
                                        ^~~~~~~~~~~~~~
  torchvision/datasets/cityscapes.py:191: error: Incompatible types in assignment
  (expression has type "Image", variable has type "Dict[str, Any]")  [assignment]
                      target = Image.open(self.targets[index][i])
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@NicolasHug NicolasHug requested a review from pmeier May 3, 2024 10:31
Copy link

pytorch-bot bot commented May 3, 2024

🔗 Helpful Links

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

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

❌ 18 New Failures, 19 Unrelated Failures

As of commit 7aa8d93 with merge base 8134306 (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.

target = self._load_json(self.targets[index][i])
else:
target = Image.open(self.targets[index][i])
target = Image.open(self.targets[index][i]) # type: ignore[assignment]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: You can get rid of this by putting target: Any above the if

@NicolasHug NicolasHug merged commit f766d7a into pytorch:main May 3, 2024
@NicolasHug NicolasHug deleted the aljenfljanefaef branch May 3, 2024 11:44
Copy link

github-actions bot commented May 3, 2024

Hey @NicolasHug!

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

facebook-github-bot pushed a commit that referenced this pull request May 8, 2024
Reviewed By: vmoens

Differential Revision: D57099462

fbshipit-source-id: 297d501192d47caa4d3be158f054c43273b2ecba
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.

3 participants