MONAI
MONAI copied to clipboard
remove `torch.testing.assert_allclose` calls
Is your feature request related to a problem? Please describe.
`torch.testing.assert_allclose()` is deprecated since 1.12 and will be removed in 1.14.
Use torch.testing.assert_close() instead.
For detailed upgrade instructions see https://github.com/pytorch/pytorch/issues/61844.
might be useful to enhance tests.utils.assert_allclose https://github.com/Project-MONAI/MONAI/blob/7f80288381575121e670a4e184d45b01813a51be/tests/utils.py#L77 and remove all the torch.testing.assert_allclose()
calls.
Yes, I also see this warning when developing the MetaTensor for crop and pad transforms. I changed to use our tests.assert_allclose
API instead.
Thanks.