Skip to content

Commit

Permalink
fixed metrics device condition for mps (#693)
Browse files Browse the repository at this point in the history
  • Loading branch information
nkaenzig authored Oct 22, 2024
1 parent b7fffbe commit 095ef7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/eva/core/models/modules/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def metrics_device(self) -> torch.device:
device = os.getenv("METRICS_DEVICE", None)
if device is not None:
return torch.device(device)
elif self.device == torch.device("mps"):
elif self.device.type == "mps":
# mps seems to have compatibility issues with segmentation metrics
return torch.device("cpu")
return self.device
Expand Down

0 comments on commit 095ef7b

Please sign in to comment.