MONAI
MONAI copied to clipboard
AssertionError in TestSURELoss
======================================================================
FAIL: test_complex_general_input (tests.test_sure_loss.TestSURELoss)
Test SURELoss with complex-valued input: when the input is general complex value, the loss should be 0.0.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/work/MONAI/MONAI/tests/test_sure_loss.py", line 68, in test_complex_general_input
self.assertAlmostEqual(loss_real.item(), loss_complex.abs().item(), places=6)
AssertionError: 2.323428153991699 != 2.3234288692474365 within 6 places (7.152557373046875e-07 difference)
----------------------------------------------------------------------
https://github.com/Project-MONAI/MONAI/actions/runs/10475022817/job/29010724209?pr=8021
Hi @cxlcl, could you please help take a look at the issue, seems like a random issue? There doesn't seem to be much of a difference, more like a precision issue. Do you think we can modify the places to be 7 here? Thanks.
Yes, it should be a precision issue, and it should a random issue as well. So we can modify it to be 7 or more.
Do you think it make sense we can modify the places to be 7 here?