Spaces:
Running
Running
Muennighoff
commited on
Commit
•
e5ff5c7
1
Parent(s):
1bd4020
Fix multilingual langs
Browse files
app.py
CHANGED
@@ -141,22 +141,6 @@ def get_mteb_data(tasks=["Clustering"], langs=[], cast_to_str=True, task_to_metr
|
|
141 |
else:
|
142 |
task_results = [sub_res for sub_res in meta["model-index"][0]["results"] if (sub_res.get("task", {}).get("type", "") in tasks)]
|
143 |
out = [{res["dataset"]["name"].replace("MTEB ", ""): [round(score["value"], 2) for score in res["metrics"] if score["type"] == task_to_metric.get(res["task"]["type"])][0]} for res in task_results]
|
144 |
-
#else:
|
145 |
-
# Multilingual
|
146 |
-
# out = list(
|
147 |
-
# map(
|
148 |
-
# lambda x: {
|
149 |
-
# x["dataset"]["name"].replace("MTEB ", ""): round(
|
150 |
-
# list(filter(lambda x: x["type"] == metric, x["metrics"]))[0]["value"], 2
|
151 |
-
# )
|
152 |
-
# },
|
153 |
-
# filter(
|
154 |
-
# lambda x: (x.get("task", {}).get("type", "") in tasks)
|
155 |
-
# and (x.get("dataset", {}).get("config", "") in ("default", *langs)),
|
156 |
-
# meta["model-index"][0]["results"],
|
157 |
-
# ),
|
158 |
-
# )
|
159 |
-
# )
|
160 |
out = {k: v for d in out for k, v in d.items()}
|
161 |
out["Model"] = make_clickable_model(model.modelId)
|
162 |
df_list.append(out)
|
|
|
141 |
else:
|
142 |
task_results = [sub_res for sub_res in meta["model-index"][0]["results"] if (sub_res.get("task", {}).get("type", "") in tasks)]
|
143 |
out = [{res["dataset"]["name"].replace("MTEB ", ""): [round(score["value"], 2) for score in res["metrics"] if score["type"] == task_to_metric.get(res["task"]["type"])][0]} for res in task_results]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
out = {k: v for d in out for k, v in d.items()}
|
145 |
out["Model"] = make_clickable_model(model.modelId)
|
146 |
df_list.append(out)
|