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

build(deps): bump monai from 1.3.2 to 1.4.0 in /requirements #2795

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements/segmentation_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# in case you want to preserve/enforce restrictions on the latest compatible version, add "strict" as an in-line comment

scipy >1.0.0, <1.15.0
monai ==1.3.2
monai ==1.4.0
4 changes: 2 additions & 2 deletions tests/unittests/_helpers/testers.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _assert_allclose(tm_result: Any, ref_result: Any, atol: float = 1e-8, key: O
ref_result.detach().cpu().numpy() if isinstance(ref_result, Tensor) else ref_result,
atol=atol,
equal_nan=True,
)
), f"tm_result: {tm_result}, ref_result: {ref_result}"
# multi output compare
elif isinstance(tm_result, Sequence):
for pl_res, ref_res in zip(tm_result, ref_result):
Expand All @@ -50,7 +50,7 @@ def _assert_allclose(tm_result: Any, ref_result: Any, atol: float = 1e-8, key: O
ref_result.detach().cpu().numpy() if isinstance(ref_result, Tensor) else ref_result,
atol=atol,
equal_nan=True,
)
), f"tm_result: {tm_result}, ref_result: {ref_result}"
else:
raise ValueError("Unknown format for comparison")

Expand Down
4 changes: 2 additions & 2 deletions tests/unittests/segmentation/test_generalized_dice_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ def _reference_generalized_dice(
if input_format == "index":
preds = torch.nn.functional.one_hot(preds, num_classes=NUM_CLASSES).movedim(-1, 1)
target = torch.nn.functional.one_hot(target, num_classes=NUM_CLASSES).movedim(-1, 1)
val = compute_generalized_dice(preds, target, include_background=include_background)
val = compute_generalized_dice(preds, target, include_background=include_background, sum_over_classes=True)
if reduce:
val = val.mean()
return val
return val.squeeze()


@pytest.mark.parametrize(
Expand Down
Loading