-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Parametrize some TestAutogradFunctional tests to use logging_tensor #73854
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
[ghstack-poisoned]
CI Flow Status⚛️ CI FlowRuleset - Version:
|
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit de5136c (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).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
…ng_tensor" [ghstack-poisoned]
…ng_tensor" Remaining tests can be parametrized as well once this PR is finalized [ghstack-poisoned]
…ng_tensor" Remaining tests can be parametrized as well once this PR is finalized [ghstack-poisoned]
|
@albanD this might be ready for review. It's actually a bit tricky to convert to using It seems like if I wanted to modify the behavior of calls into
|
…ng_tensor" Remaining tests can be parametrized as well once this PR is finalized [ghstack-poisoned]
|
@soulitzer has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
albanD
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.
Ok
| "rand": torch.rand, | ||
| "tensor": torch.tensor, | ||
| # TODO: maybe move somewhere so other tests can also use | ||
| # TODO: according to https://pytorch.org/cppdocs/notes/tensor_creation.html |
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.
Do we need these other functions? Is that really a TODO?
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.
Hmm let me address this in the follow up where I update the other tests, torch.eye is used once in this file so I might add that.
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.
I'm fine with adding them as needed. And it is not really a TODO to be exhaustive here.
| TestCase, run_tests, subtest, gradcheck, gradgradcheck, parametrize, instantiate_parametrized_tests) | ||
| from torch.testing._internal.logging_tensor import LoggingTensor | ||
|
|
||
| # Utilities for parametrizing the tensor constructors used in autograd tests |
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.
I feel like these could go into a separate file.
But ok for now indeed.
|
Hey @soulitzer. |
…#73854) Summary: Pull Request resolved: pytorch/pytorch#73854 Remaining tests can be parametrized as well once this PR is finalized Test Plan: Imported from OSS Reviewed By: albanD Differential Revision: D34703584 Pulled By: soulitzer fbshipit-source-id: 83d90748c87cc8a18a7bb034e6402dae3d8c23a1 (cherry picked from commit 427aace4800ea37b847353a76df546aadc66642e)
…#73854) Summary: Pull Request resolved: pytorch/pytorch#73854 Remaining tests can be parametrized as well once this PR is finalized Test Plan: Imported from OSS Reviewed By: albanD Differential Revision: D34703584 Pulled By: soulitzer fbshipit-source-id: 83d90748c87cc8a18a7bb034e6402dae3d8c23a1 (cherry picked from commit 427aace4800ea37b847353a76df546aadc66642e)
Stack from ghstack:
Remaining tests can be parametrized as well once this PR is finalized
Differential Revision: D34703584