Allow Tensor-likes in torch.autograd.gradcheck#43877
Allow Tensor-likes in torch.autograd.gradcheck#43877hameerabbasi wants to merge 3 commits intopytorch:masterfrom
Conversation
💊 CI failures summary and remediationsAs of commit cec5804 (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 63 times. |
489f24b to
71e15c6
Compare
8460f7b to
588dd4a
Compare
0c1e60a to
7d2a403
Compare
|
The overall approach looks pretty reasonable. Please ping when not WIP. |
7d2a403 to
981cbee
Compare
Codecov Report
@@ Coverage Diff @@
## master #43877 +/- ##
=======================================
Coverage 69.24% 69.25%
=======================================
Files 381 381
Lines 47573 47580 +7
=======================================
+ Hits 32943 32951 +8
+ Misses 14630 14629 -1
Continue to review full report at Codecov.
|
|
I think this is ready for review. The CI failure is unrelated: It's a bunch of connection refused errors. |
981cbee to
860920c
Compare
| Currently, this occurs whenever there's a ``__torch_function__`` | ||
| attribute on the input. | ||
| """ | ||
| return type(inp) is torch.Tensor or hasattr(inp, "__torch_function__") |
There was a problem hiding this comment.
nit: Why not use isinstance here? the type check is better?
There was a problem hiding this comment.
It’s faster, I believe.
facebook-github-bot
left a comment
There was a problem hiding this comment.
@ezyang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
@ezyang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
Do we know why the internal tests are failing? Can someone provide a repro-er and/or a traceback? |
|
Hey, |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@ezyang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
reverting this because of test failure in #43208 @hameerabbasi can you fix this? |
This reverts commit f9a0d0c. [ghstack-poisoned]
|
Just to clarify, @hameerabbasi, I forgot that there is a high priority update being made to gradcheck right now to make it support complex numbers. This takes priority over enhanced I briefly looked at the error with @anjali411 but I couldn't figure out why the torch function test stopped working, even when passing non-complex inputs. |
|
Sure. I can make those changes in a follow-up PR. |
Summary: Fixes pytorch#42942 Pull Request resolved: pytorch#43877 Reviewed By: zou3519 Differential Revision: D23493257 Pulled By: ezyang fbshipit-source-id: 6cdaabe17157b484e9491189706ccc15420ac239
Summary: Fixes pytorch#42942 Re-do of pytorch#43877. Pull Request resolved: pytorch#45732 Reviewed By: mruberry Differential Revision: D24195820 Pulled By: albanD fbshipit-source-id: 8f43353077f341e34371affd76be553c0ef7d98a
Fixes #42942