-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Fix type annotation errors in torch.functional #43446
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
💊 CI failures summary and remediationsAs of commit 681be55 (more details on the Dr. CI page): ✅ None of the CI failures appear to be your fault 💚
🚧 1 fixed upstream failure:These were probably caused by upstream breakages that were already fixed.
Please rebase on the
|
f22223d to
a16916b
Compare
torch/functional.py
Outdated
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.
👍
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.
@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
Hmm, still some inscrutable JIT errors that need fixing. Part of the issue is that |
|
Okay, isolated the issue and a proposed way of fixing it in gh-43454. This PR is blocked until that's resolved. |
Summary: - `torch._VF` is a hack to work around the lack of support for `torch.functional` in the JIT - that hack hides `torch._VF` functions from Mypy - could be worked around by re-introducing a stub file for `torch.functional`, but that's undesirable - so instead try to make both happy at the same time: the type ignore comments are needed for Mypy, and don't seem to affect the JIT after excluding them from the `get_type_line()` logic Encountered this issue while trying to make `mypy` run on `torch/functional.py` in gh-43446. Pull Request resolved: #43454 Reviewed By: glaringlee Differential Revision: D23305579 Pulled By: malfet fbshipit-source-id: 50e490693c1e53054927b57fd9acc7dca57e88ca
a16916b to
5771d55
Compare
|
Hmm, there's one CI failure (in Likely a matter of updating the expected result, I'll look into it. EDIT: yes, I can reproduce locally. The tweak to call a |
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.
@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
This looks good to go now, the one CI failure is unrelated. |
Closes gh-42968