From 23d6cb2fd6dd6ab1e6aec489819185c14469522b Mon Sep 17 00:00:00 2001 From: Kenneth Enevoldsen Date: Thu, 14 Nov 2024 11:50:28 +0100 Subject: [PATCH] fix: remove NaN handling for retrieval --- mteb/evaluation/evaluators/model_classes.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mteb/evaluation/evaluators/model_classes.py b/mteb/evaluation/evaluators/model_classes.py index 7c984b634..60dea5638 100644 --- a/mteb/evaluation/evaluators/model_classes.py +++ b/mteb/evaluation/evaluators/model_classes.py @@ -343,12 +343,6 @@ def _full_corpus_search( query_embeddings, sub_corpus_embeddings ) - is_nan = torch.isnan(cos_scores) - if is_nan.sum() > 0: - raise ValueError( - f"NaN values detected in the similarity scores: {is_nan.sum()}" - ) - # get top-k values cos_scores_top_k_values, cos_scores_top_k_idx = torch.topk( cos_scores,