add type annotations to torch.nn.modules.module#49045
add type annotations to torch.nn.modules.module#49045guilhermeleobas wants to merge 7 commits intopytorch:masterfrom guilhermeleobas:module
Conversation
💊 CI failures summary and remediationsAs of commit b9382f2 (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. This comment has been revised 33 times. |
Codecov Report
@@ Coverage Diff @@
## master #49045 +/- ##
==========================================
- Coverage 80.72% 80.72% -0.01%
==========================================
Files 1904 1904
Lines 206764 206764
==========================================
- Hits 166908 166907 -1
- Misses 39856 39857 +1 |
|
@guilhermeleobas could you also add comments here about the ignores you added? That helps both with review (reproducing the failures and using |
|
Also, in your next commit message, can you add that it closes gh-48640? |
|
Hi @rgommers, thanks for the review. I've addressed your comments |
rgommers
left a comment
There was a problem hiding this comment.
Looks good now, thanks @guilhermeleobas.
CI notifications seem stuck, but CI is done - see https://app.circleci.com/pipelines/github/pytorch/pytorch?branch=pull%2F49045. Failures are unrelated.
There was a problem hiding this comment.
why cant we just use different variable names?
There was a problem hiding this comment.
Yes, that works too
There was a problem hiding this comment.
I am not python expert. but cant we use del load to remove the function reference itself? (after all the load has been done, yes?)
Co-authored-by: Ralf Gommers <ralf.gommers@gmail.com>
|
Do not merge this PR until one checks if the annotations introduce any regression. See: |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@walterddr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
| @@ -279,7 +279,7 @@ def parameters(self, recurse: bool = True) -> Iterator[Parameter]: | |||
|
|
|||
| def named_parameters( # type: ignore[return] | |||
There was a problem hiding this comment.
shouldn't we remove this type ignore as well since we fixed the return Parameter
There was a problem hiding this comment.
torch/distributed/nn/api/remote_module.py:280: error: Missing return statement [return]
facebook-github-bot
left a comment
There was a problem hiding this comment.
@walterddr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
walterddr
left a comment
There was a problem hiding this comment.
looks good. I dont see any additional JIT test required.
|
actually please rebase master --> seems like merge conflict is preventing fb internal CI to run |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@walterddr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@walterddr merged this pull request in 5f8e1a1. |
Summary: Fixes pytorch#49044 Pull Request resolved: pytorch#49045 Reviewed By: malfet Differential Revision: D25767092 Pulled By: walterddr fbshipit-source-id: a81ba96f3495943af7bb9ee3e5fc4c94c690c405
Fixes #49044