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

Incorrect info about overriding torch tensors in version 1.7.0 #47697

Closed
jemisjoky opened this issue Nov 10, 2020 · 5 comments
Closed

Incorrect info about overriding torch tensors in version 1.7.0 #47697

jemisjoky opened this issue Nov 10, 2020 · 5 comments
Assignees
Labels
high priority module: docs Related to our documentation, both in docs/ and docblocks module: __torch_function__ triage review triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Milestone

Comments

@jemisjoky
Copy link

jemisjoky commented Nov 10, 2020

📚 Documentation

I've been working on extending the torch.Tensor class, where the information provided in the torch._overrides has proven really helpful! After recently upgrading to torch version 1.7.0 however, I noticed that the attribute _overrides is no longer present in torch. Two questions/comments about this:

  1. Is the information that used to be in torch._overrides still present somewhere else in the library?
  2. The documentation for torch 1.7.0 still refers to torch._overrides, so should be updated with the correct info.

Thank you for your help with this :)

cc @ezyang @gchanan @zou3519 @bdhirsh @hameerabbasi @rgommers @jlin27 @mruberry

@gchanan
Copy link
Contributor

gchanan commented Nov 11, 2020

Thanks for pointing this out @jemisjoky, it is indeed an oversight. It looks like torch._overrides is now torch.overrides and we should update the documentation.

@gchanan gchanan added this to the 1.7.1 milestone Nov 11, 2020
@jemisjoky
Copy link
Author

Haha if I had just looked a bit further down in dir(torch) it would have been obvious where it had moved to. Thanks a bunch for that info @gchanan, super helpful!

@ailzhang ailzhang added module: docs Related to our documentation, both in docs/ and docblocks triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Nov 11, 2020
@rgommers
Copy link
Collaborator

@hameerabbasi did we consciously decide to move to the non-underscored name? torch.overrides isn't in the docs as a public submodule, so that's a little inconsistent.

@hameerabbasi
Copy link
Collaborator

Yes, this was done in #37091, specifically in b422a1b, in the context of there being various utility methods there that were already well-tested and needed to be exposed, such as, for example, is_tensor_method_or_property. I can't seem to find the conversation, maybe it happened in a meeting.

@hameerabbasi
Copy link
Collaborator

I've created the docs issue in #48087.

seemethere pushed a commit to hameerabbasi/pytorch that referenced this issue Nov 19, 2020
…ytorch#47842)

Summary:
Fixes pytorch#47697

Pull Request resolved: pytorch#47842

Reviewed By: smessmer

Differential Revision: D24951750

Pulled By: ezyang

fbshipit-source-id: df62ec2e52f1c561c864a50bac4abf4a55e4f8e6
(cherry picked from commit 3a2aad9)
Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
seemethere pushed a commit that referenced this issue Nov 20, 2020
…47843)

Summary:
Fixes #47697

Pull Request resolved: #47842

Reviewed By: smessmer

Differential Revision: D24951750

Pulled By: ezyang

fbshipit-source-id: df62ec2e52f1c561c864a50bac4abf4a55e4f8e6
(cherry picked from commit 3a2aad9)
Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority module: docs Related to our documentation, both in docs/ and docblocks module: __torch_function__ triage review triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants