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