Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions mteb/load_results/task_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,15 +387,16 @@ def _convert_from_before_v1_11_0(cls, data: dict) -> TaskResult:
main_score = task.metadata.main_score
for split, split_score in scores.items():
for hf_subset, hf_subset_scores in split_score.items():
if task.metadata.type == "STS":
for name, prev_name in [
("cosine", "cos_sim"),
("manhattan", "manhattan"),
("euclidean", "euclidean"),
]:
prev_name_scores = hf_subset_scores.pop(
prev_name, {"spearman": "NaN"}
)
for name, prev_name in [
("cosine", "cos_sim"),
("manhattan", "manhattan"),
("euclidean", "euclidean"),
("dot", "dot"),
("max", "max"),
("similarity", "similarity"),
]:
prev_name_scores = hf_subset_scores.pop(prev_name, None)
if prev_name_scores is not None:
for k, v in prev_name_scores.items():
hf_subset_scores[f"{name}_{k}"] = v

Expand Down