Skip to content

Commit

Permalink
Update mteb
Browse files Browse the repository at this point in the history
  • Loading branch information
Muennighoff authored Apr 8, 2024
1 parent a342844 commit 01b2ed4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/mteb_to_tex.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@

all_results = {}

mteb_task_names = [t.description["name"] for t in MTEB().tasks] + ["CQADupstackRetrieval"]
mteb_task_names = [t.metadata.name for t in MTEB().tasks] + ["CQADupstackRetrieval"]

for model_name in os.listdir(results_folder):
model_res_folder = os.path.join(results_folder, model_name)
Expand All @@ -217,7 +217,7 @@ def get_rows(dataset, model_name, limit_langs=[], skip_langs=[]):
# CQADupstackRetrieval uses the same metric as its subsets
tasks = MTEB(tasks=[dataset.replace("CQADupstackRetrieval", "CQADupstackTexRetrieval")]).tasks
assert len(tasks) == 1, f"Found {len(tasks)} for {dataset}. Expected 1."
main_metric = tasks[0].description["main_score"]
main_metric = tasks[0].metadata.main_score
test_result = all_results.get(model_name, {}). get(dataset, {})

# Dev / Val set is used for MSMARCO (See BEIR paper)
Expand All @@ -228,7 +228,7 @@ def get_rows(dataset, model_name, limit_langs=[], skip_langs=[]):
else:
test_result = test_result.get("test")

for lang in tasks[0].description["eval_langs"]:
for lang in tasks[0].metadata.eval_langs:
if (limit_langs and lang not in limit_langs) or (skip_langs and lang in skip_langs):
continue
elif test_result is None:
Expand Down

0 comments on commit 01b2ed4

Please sign in to comment.