From dc3dbdee756f56609dc70e5cd3a5362d61c8772c Mon Sep 17 00:00:00 2001 From: Nicolas Kaenzig Date: Tue, 22 Oct 2024 08:34:38 +0200 Subject: [PATCH] fixed condition for mps --- src/eva/core/models/modules/module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eva/core/models/modules/module.py b/src/eva/core/models/modules/module.py index c46688a6..55f3f279 100644 --- a/src/eva/core/models/modules/module.py +++ b/src/eva/core/models/modules/module.py @@ -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