Project-MONAI / Project-MONAI/MONAI
AssertionError in TestSURELoss
Open
Nobody has claimed this yet.
bug
- Dominant language
- Python
- Stars
- 8.7k
- Forks
- 1.6k
- Avg merge
- 5d 1h
- Merged PRs (30d)
- 20
Description
======================================================================
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with tests/test_sure_loss.py at line 68 and run test_complex_general_input to reproduce the reported floating-point mismatch. Trace the SURELoss behavior for general complex input and determine whether the test or implementation should change; done means the test passes while preserving the stated expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100