Skip to content

Commit

Permalink
BUG: if the model defines a similarity score, STS pearson and spearma…
Browse files Browse the repository at this point in the history
…n are written as arrays, not as scores.

Fixes #1206
  • Loading branch information
KennethEnevoldsen committed Sep 9, 2024
1 parent 16b2220 commit 39a8068
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mteb/evaluation/evaluators/STSEvaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def __call__(
similarity_scores = np.array(_similarity_scores)

if similarity_scores is not None:
pearson = pearsonr(self.gold_scores, similarity_scores)
spearman = spearmanr(self.gold_scores, similarity_scores)
pearson, _ = pearsonr(self.gold_scores, similarity_scores)
spearman, _ = spearmanr(self.gold_scores, similarity_scores)
else:
# if model does not have a similarity function, we assume the cosine similarity
pearson = cosine_pearson
Expand Down

0 comments on commit 39a8068

Please sign in to comment.