Spaces:
Sleeping
Sleeping
Heatmap: Change from abbreviations to category and task names
Browse files
server.py
CHANGED
@@ -784,7 +784,7 @@ class LeaderboardServer:
|
|
784 |
for abbr, name in abbreviation2name.items():
|
785 |
for model in model_names:
|
786 |
score = float(ldb_records[model][name])
|
787 |
-
task2model2score.setdefault(
|
788 |
else:
|
789 |
fig_y_axis_label = "Task"
|
790 |
abbreviation2name = self.CATEGORY_TO_TASK_ABBREVIATION_TO_DETAILS[category]
|
@@ -792,7 +792,7 @@ class LeaderboardServer:
|
|
792 |
for abbr, name, url in abbreviation2name.values():
|
793 |
for model in model_names:
|
794 |
score = float(ldb_records[model][abbr])
|
795 |
-
task2model2score.setdefault(
|
796 |
|
797 |
# Convert proportions dictionary to DataFrame
|
798 |
# Transpose to have models as rows and tasks as columns
|
@@ -813,7 +813,7 @@ class LeaderboardServer:
|
|
813 |
# Create task_to_category
|
814 |
task_to_category = {}
|
815 |
for task, details in self.TASKS_METADATA.items():
|
816 |
-
task_to_category[details['
|
817 |
|
818 |
if category == self.TASKS_CATEGORY_OVERALL_DETAILS:
|
819 |
# Create a Series from task_to_category with tasks as index
|
|
|
784 |
for abbr, name in abbreviation2name.items():
|
785 |
for model in model_names:
|
786 |
score = float(ldb_records[model][name])
|
787 |
+
task2model2score.setdefault(name, dict())[model] = score
|
788 |
else:
|
789 |
fig_y_axis_label = "Task"
|
790 |
abbreviation2name = self.CATEGORY_TO_TASK_ABBREVIATION_TO_DETAILS[category]
|
|
|
792 |
for abbr, name, url in abbreviation2name.values():
|
793 |
for model in model_names:
|
794 |
score = float(ldb_records[model][abbr])
|
795 |
+
task2model2score.setdefault(name, dict())[model] = score
|
796 |
|
797 |
# Convert proportions dictionary to DataFrame
|
798 |
# Transpose to have models as rows and tasks as columns
|
|
|
813 |
# Create task_to_category
|
814 |
task_to_category = {}
|
815 |
for task, details in self.TASKS_METADATA.items():
|
816 |
+
task_to_category[details['name']] = details['category']
|
817 |
|
818 |
if category == self.TASKS_CATEGORY_OVERALL_DETAILS:
|
819 |
# Create a Series from task_to_category with tasks as index
|