Conversation
|
I wasn't aware of the API changes in the torch nightly builds, thanks for keeping me up-to-date on this. Yes, I agree that a wrapper would be cleaner, although the PR in its current form would also work. So if I'm understanding this correctly, we would have in # assume imports
def torch_assert_equal(actual, expected, rtol=0.0, atol=0.0):
return torch.testing.assert_close(actual, expected, rtol=rtol, atol=atol)Depending on how you'd like to proceed logistically, we can either implement the wrapper in this PR, or we can merge this in first, and I'll open a new PR that adds the wrapper to |
|
Almost, as this is equal, it'd just be: or can even use partial: but this one is harder to document, so the former it is. I pushed the change to use the wrapper. |
|
Looks good to me! Agreed that the former would suffice. Thanks for taking care of this. |
pytorch-1.10-to-be dropped the non-public API
torch.testing.assert_equal, see: https://pytorch.org/docs/stable/testing.htmlSo this is a follow up to: #47 to make the tests work with pt-nightly.
I used
to replace the function that was removed.
Perhaps we can add a wrapper for
torch_assert_equalintesting_utils.pyinstead?@jaketae