From c292b31612780c620b9f8e2885a7a4527826e17f Mon Sep 17 00:00:00 2001 From: Arne Binder Date: Wed, 27 Sep 2023 14:04:20 +0200 Subject: [PATCH] log a warning and remove "mean", "std", "min" from aggregation_functions if labels are inferred from data --- src/pytorch_ie/metrics/statistics.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pytorch_ie/metrics/statistics.py b/src/pytorch_ie/metrics/statistics.py index 53c869d9..c8a5ce4a 100644 --- a/src/pytorch_ie/metrics/statistics.py +++ b/src/pytorch_ie/metrics/statistics.py @@ -131,9 +131,9 @@ def __init__( f"this collector, but be aware that the results may be wrong for your own aggregation " f"functions that rely on zero values." ) - self.aggregation_functions = [ - func for func in self.aggregation_functions if func not in ["mean", "std", "min"] - ] + self.aggregation_functions = { + name: func for name, func in self.aggregation_functions.items() if name not in ["mean", "std", "min"] + } self.labels = labels