-
Notifications
You must be signed in to change notification settings - Fork 26.3k
add typing annotations for a few torch.utils.* modules #43806
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
Conversation
rgommers
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @guilhermeleobas. The TorchType thing deserves some explanation. Overall looks good though.
💊 CI failures summary and remediationsAs of commit ac92e5d (more details on the Dr. CI page):
ci.pytorch.org: 1 failedThis 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 on the GitHub issue tracker or post in the (internal) Dr. CI Users group. This comment has been revised 19 times. |
Codecov Report
@@ Coverage Diff @@
## master #43806 +/- ##
=======================================
Coverage 69.24% 69.24%
=======================================
Files 381 381
Lines 47573 47574 +1
=======================================
+ Hits 32943 32944 +1
Misses 14630 14630
Continue to review full report at Codecov.
|
|
PR is ready for review. Failure doesn't seem to be caused by any changes introduced in this PR. cc @rgommers |
| class TensorType(JitType): | ||
| @classmethod | ||
| def get(cls) -> TensorType: ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, why is this not a staticmethod with no args?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No particular reason. This code was introduced in a different PR. I just moved it to be close to the other methods that you defined before. I can the @classmethod to a @staticmethod if you want.
rgommers
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, ready to merge.
|
@SplitInfinity since you've already reviewed this PR, would you be able to land it? |
|
I didn't quite review it but I can take charge of landing it, sure. |
facebook-github-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SplitInfinity has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@SplitInfinity merged this pull request in cdf5e2a. |
Summary: Fixes #43431. Depends on [gh-43862](#43862) (EDIT: now merged) Modules: - torch.utils.mkldnn - torch.utils.mobile_optimizer - torch.utils.bundled_inputs Pull Request resolved: #43806 Reviewed By: gmagogsfm Differential Revision: D23635151 Pulled By: SplitInfinity fbshipit-source-id: a85b75a7927dde6cc55bcb361f8ff601ffb0b2a1
Fixes #43431. Depends on gh-43862 (EDIT: now merged)
Modules: