-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Mypy fixes for pytorch master #52090
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
Codecov Report
@@ Coverage Diff @@
## master #52090 +/- ##
==========================================
+ Coverage 80.57% 80.74% +0.16%
==========================================
Files 1957 1955 -2
Lines 214523 214413 -110
==========================================
+ Hits 172852 173127 +275
+ Misses 41671 41286 -385 |
💊 CI failures summary and remediationsAs of commit de159d6 (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. |
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 bool
and float
changes were already fixed in another PR a couple of days ago, so you can drop those changes it looks like.
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 now, thanks @guilhermeleobas.
CI failures are unrelated.
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.
Can you please add some explanation to the PR description, mentioning why np.bool
needs to be changed to np.bool_
and np.float
to np.float64
And, as @rgommers mentioned, please use np.float64
rather than np.float_
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.
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.
Summary: This PR adds fixes mypy issues on the current pytorch main branch. In special, it replaces occurrences of `np.bool/np.float` to `np.bool_/np.float64`, respectively: ``` test/test_numpy_interop.py:145: error: Module has no attribute "bool"; maybe "bool_" or "bool8"? [attr-defined] test/test_numpy_interop.py:159: error: Module has no attribute "float"; maybe "float_", "cfloat", or "float64"? [attr-defined] ``` Pull Request resolved: pytorch#52090 Reviewed By: walterddr Differential Revision: D26469596 Pulled By: malfet fbshipit-source-id: e55a5c6da7b252469e05942e0d2588e7f92b88bf
This PR adds fixes mypy issues on the current pytorch main branch. In special, it replaces occurrences of
np.bool/np.float
tonp.bool_/np.float64
, respectively: