Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError in test_regularization #7697

Closed
KumoLiu opened this issue Apr 23, 2024 · 3 comments · Fixed by #7813 · May be fixed by #7702
Closed

AssertionError in test_regularization #7697

KumoLiu opened this issue Apr 23, 2024 · 3 comments · Fixed by #7813 · May be fixed by #7702
Labels
bug Something isn't working Contribution wanted

Comments

@KumoLiu
Copy link
Contributor

KumoLiu commented Apr 23, 2024

Random;y occur this error:

======================================================================
FAIL: test_cutmixd (tests.test_regularization.TestCutMix)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/MONAI/MONAI/tests/test_regularization.py", line 88, in test_cutmixd
    self.assertTrue(not torch.allclose(output["a"], output["b"]))
AssertionError: False is not true

----------------------------------------------------------------------
@KumoLiu
Copy link
Contributor Author

KumoLiu commented Apr 23, 2024

Hi @juampatronics, could you please help take a look at the issue?
Seems the dictionary version should also be inherit the RandomizableTransform.
https://github.com/Project-MONAI/MONAI/blob/dev/monai/transforms/regularization/dictionary.py#L38

Thanks.

@KumoLiu KumoLiu added bug Something isn't working Contribution wanted labels Apr 23, 2024
@juampatronics
Copy link
Contributor

@KumoLiu yes, I'll fix it

@juampatronics
Copy link
Contributor

@KumoLiu please check

KumoLiu added a commit to KumoLiu/MONAI that referenced this issue May 29, 2024
Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
KumoLiu added a commit that referenced this issue May 30, 2024
Fixes #7697

### Description

A few sentences describing the changes proposed in this pull request.

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.

---------

Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
Co-authored-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
slicepaste pushed a commit to slicepaste/MONAI that referenced this issue Jun 3, 2024
Fixes Project-MONAI#7697

### Description

A few sentences describing the changes proposed in this pull request.

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.

---------

Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
Co-authored-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Contribution wanted
Projects
None yet
2 participants