-
Notifications
You must be signed in to change notification settings - Fork 25k
Convert assert -> cast. #57458
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
Convert assert -> cast. #57458
Conversation
💊 CI failures summary and remediationsAs of commit 697fc27 (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. |
23a8f1d
to
9592ebe
Compare
9592ebe
to
2e8e6ef
Compare
Codecov Report
@@ Coverage Diff @@
## master #57458 +/- ##
==========================================
- Coverage 76.83% 76.82% -0.01%
==========================================
Files 1986 1986
Lines 197402 197393 -9
==========================================
- Hits 151671 151654 -17
- Misses 45731 45739 +8 |
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.
This LGTM, thanks @hameerabbasi. Removal of all these asserts is quite nice.
LSTM
and GRU` are not currently broken with tensor-like's, but adding them to this regression test would be good. If needed can be done afterwards though; this PR should go in for 1.9.0
@walterddr or @mruberry could we land this before the branch cut? It fixes a fairly annoying regression. |
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.
looks good to me.
self.weight: Optional[Tensor] | ||
self.pos_weight: Optional[Tensor] |
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.
should these be in the class scope? (https://www.python.org/dev/peps/pep-0526/#id9)
@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 46e4b2d. |
Summary: Fixes pytorch#55868. Pull Request resolved: pytorch#57458 Reviewed By: mruberry Differential Revision: D28365745 Pulled By: walterddr fbshipit-source-id: 35cc3fa85f87b0ef98cf970f620ab909d240c7be
Fixes #55868.