Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Fix refresh on the overall tab (#122)
Browse files- Fix overall refresh by fixing common lamba bug (ccf7b059f91a87f91f5b95dcd864261723a263f2)
app.py
CHANGED
|
@@ -399,6 +399,11 @@ def get_refresh_function(task_category, task_list):
|
|
| 399 |
return data_task_category
|
| 400 |
return _refresh
|
| 401 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 402 |
data = {
|
| 403 |
"Overall": {"metric": "Various, refer to task tabs", "data": []}
|
| 404 |
}
|
|
@@ -425,7 +430,7 @@ for board, board_config in BOARDS_CONFIG.items():
|
|
| 425 |
"language_long": board_config["language_long"],
|
| 426 |
"description": f"**Overall MTEB {overall_pretty_name}** 🔮{board_icon}",
|
| 427 |
"data": boards_data[board]["data_overall"],
|
| 428 |
-
"refresh":
|
| 429 |
"credits": credits,
|
| 430 |
})
|
| 431 |
for task_category, task_category_list in board_config["tasks"].items():
|
|
|
|
| 399 |
return data_task_category
|
| 400 |
return _refresh
|
| 401 |
|
| 402 |
+
|
| 403 |
+
def get_refresh_overall_function(tasks):
|
| 404 |
+
return lambda: get_mteb_average(tasks)[0]
|
| 405 |
+
|
| 406 |
+
|
| 407 |
data = {
|
| 408 |
"Overall": {"metric": "Various, refer to task tabs", "data": []}
|
| 409 |
}
|
|
|
|
| 430 |
"language_long": board_config["language_long"],
|
| 431 |
"description": f"**Overall MTEB {overall_pretty_name}** 🔮{board_icon}",
|
| 432 |
"data": boards_data[board]["data_overall"],
|
| 433 |
+
"refresh": get_refresh_overall_function(board_config["tasks"]),
|
| 434 |
"credits": credits,
|
| 435 |
})
|
| 436 |
for task_category, task_category_list in board_config["tasks"].items():
|