Skip to content

Commit

Permalink
fix: remove NaN handling for retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethEnevoldsen committed Nov 14, 2024
1 parent dea2b77 commit 23d6cb2
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions mteb/evaluation/evaluators/model_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 23d6cb2

Please sign in to comment.