MONAI icon indicating copy to clipboard operation
MONAI copied to clipboard

remove `torch.testing.assert_allclose` calls

Open wyli opened this issue 2 years ago • 1 comments

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.

wyli avatar Jun 30 '22 07:06 wyli

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.

Nic-Ma avatar Jun 30 '22 13:06 Nic-Ma