Add type annotations to torch.overrides#48493
Add type annotations to torch.overrides#48493guilhermeleobas wants to merge 20 commits intopytorch:masterfrom guilhermeleobas:override
Conversation
💊 CI failures summary and remediationsAs of commit 3a123bc (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
Codecov Report
@@ Coverage Diff @@
## master #48493 +/- ##
==========================================
+ Coverage 80.66% 80.71% +0.04%
==========================================
Files 1913 1904 -9
Lines 208058 206632 -1426
==========================================
- Hits 167833 166775 -1058
+ Misses 40225 39857 -368 |
rgommers
left a comment
There was a problem hiding this comment.
Thanks @guilhermeleobas. It would be good to not add too many unnecessary ignores, but just fix the missing annotations.
hameerabbasi
left a comment
There was a problem hiding this comment.
LGTM, thanks @guilhermeleobas!
| Tensor._grad_fn.__get__: lambda self: -1, | ||
| Tensor.grad_fn.__get__: lambda self: -1, | ||
| Tensor._version.__get__: lambda self: -1, | ||
| Tensor._version.__get__: lambda self: -1, # type: ignore[attr-defined] |
There was a problem hiding this comment.
If mypy doesn't recognize this, we should file a missing annotation report.
There was a problem hiding this comment.
Actually, Tensor._version is already annotated and this type: ignore can be safely removed.
There was a problem hiding this comment.
Oh, in that case I'd expect all the X.__get__ ignores can be removed. Please do so.
|
In general, this LGTM, but I'd double-check if the ignores in the diff are necessary. |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@ezyang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
Looks like there are still some failures. Happy to merge once they're resolved. |
|
I don't know why but the facebook bot just closed this PR. |
It got merged, you should make a follow-up PR. |
|
This seems to have broken the |
|
Hey @guilhermeleobas, this breaks several tests on master, which hides real test signals. Landing a new PR would take a few hours. To avoid blocking other developers, I am going to revert this one. Please reland with your fix. Thanks! |
|
This pull request has been reverted by 1f5c3b3. |
Summary: Fixes pytorch#48492 Pull Request resolved: pytorch#48493 Reviewed By: mruberry Differential Revision: D25958987 Pulled By: ezyang fbshipit-source-id: aadc065c489bf1a8c6258de14c930e396df763bc
Summary: This is a follow up PR of pytorch#48493. Fixes pytorch#48492 Pull Request resolved: pytorch#50824 Reviewed By: bdhirsh Differential Revision: D26050736 Pulled By: ezyang fbshipit-source-id: 049605fd271cff28c8b6e300c163e9df3b3ea23b
Fixes #48492