Skip to content

remove custom __repr__ from prototype features #5916

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 1 commit into from
Apr 28, 2022

Conversation

pmeier
Copy link
Collaborator

@pmeier pmeier commented Apr 28, 2022

Amongst other things, pytorch/pytorch#73459 added support to automatically include the name of the tensor subclass in the __repr__. Thus, we no longer need to do this ourselves.

The same PR also changed the signature of Tensor.__repr__ which lead to mypy errors.

Copy link
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@NicolasHug
Copy link
Member

Do you know if this affects #5558 ?

@pmeier
Copy link
Collaborator Author

pmeier commented Apr 28, 2022

Do you know if this affects #5558 ?

Yeah I also checked, but unfortunately no. I think the issue there depends on how we add methods onto tensors.

@pmeier pmeier merged commit 7f55738 into pytorch:main Apr 28, 2022
@pmeier pmeier deleted the feature-repr branch April 28, 2022 14:03
@github-actions
Copy link

Hey @pmeier!

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 6, 2022
Reviewed By: jdsgomes, NicolasHug

Differential Revision: D36095690

fbshipit-source-id: 9567c53d9b9c2ba4094a1d9166b45fb75d6affa0
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.

4 participants