From 90829337a052535c666930d06a6844121c3f479c Mon Sep 17 00:00:00 2001 From: JINO-ROHIT Date: Thu, 28 Nov 2024 13:37:16 +0530 Subject: [PATCH] normalize to float in NanoBEIREvaluator, InformationRetrievalEvaluator, MSEEvaluator --- sentence_transformers/evaluation/SentenceEvaluator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sentence_transformers/evaluation/SentenceEvaluator.py b/sentence_transformers/evaluation/SentenceEvaluator.py index 4708ea6e2..da5876208 100644 --- a/sentence_transformers/evaluation/SentenceEvaluator.py +++ b/sentence_transformers/evaluation/SentenceEvaluator.py @@ -57,7 +57,7 @@ def __call__( def prefix_name_to_metrics(self, metrics: dict[str, float], name: str) -> dict[str, float]: if not name: return metrics - metrics = {name + "_" + key: value for key, value in metrics.items()} + metrics = {name + "_" + key: float(value) for key, value in metrics.items()} if hasattr(self, "primary_metric") and not self.primary_metric.startswith(name + "_"): self.primary_metric = name + "_" + self.primary_metric return metrics