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

Fix CUDA_VISIBLE_DEVICES setting ignored #7408

Merged
merged 4 commits into from
Jan 22, 2024
Merged
Changes from 1 commit
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
5 changes: 1 addition & 4 deletions monai/metrics/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@
binary_erosion, _ = optional_import("scipy.ndimage.morphology", name="binary_erosion")
distance_transform_edt, _ = optional_import("scipy.ndimage.morphology", name="distance_transform_edt")
distance_transform_cdt, _ = optional_import("scipy.ndimage.morphology", name="distance_transform_cdt")
cucim_binary_erosion, has_cucim_binary_erosion = optional_import("cucim.skimage.morphology", name="binary_erosion")
cucim_distance_transform_edt, has_cucim_distance_transform_edt = optional_import(
"cucim.core.operations.morphology", name="distance_transform_edt"
)

__all__ = [
"ignore_background",
Expand Down Expand Up @@ -179,6 +175,7 @@ def get_mask_edges(
always_return_as_numpy: whether to a numpy array regardless of the input type.
If False, return the same type as inputs.
"""
cucim_binary_erosion, has_cucim_binary_erosion = optional_import("cucim.skimage.morphology", name="binary_erosion")
if seg_pred.shape != seg_gt.shape:
raise ValueError(f"seg_pred and seg_gt should have same shapes, got {seg_pred.shape} and {seg_gt.shape}.")
converter: Any
Expand Down
Loading