From f74ea94112105c431a53876093a26ee98c31d1c4 Mon Sep 17 00:00:00 2001 From: Nicolas Kaenzig Date: Mon, 14 Oct 2024 16:22:55 +0200 Subject: [PATCH] set default metrics device to cpu --- 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 ba65f679..10eddeae 100644 --- a/src/eva/core/models/modules/module.py +++ b/src/eva/core/models/modules/module.py @@ -50,7 +50,7 @@ def default_postprocess(self) -> batch_postprocess.BatchPostProcess: @property def metrics_device(self) -> torch.device: """Returns the device by which the metrics should be calculated.""" - device = os.getenv("METRICS_DEVICE", None) + device = os.getenv("METRICS_DEVICE", "cpu") return self.device if device is None else torch.device(device) @override