Skip to content

Commit

Permalink
normalize to float in NanoBEIREvaluator, InformationRetrievalEvaluato…
Browse files Browse the repository at this point in the history
…r, MSEEvaluator (UKPLab#3096)
  • Loading branch information
JINO-ROHIT authored Nov 28, 2024
1 parent 31e3859 commit 9970e3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sentence_transformers/evaluation/SentenceEvaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9970e3d

Please sign in to comment.