Spaces:
Runtime error
Runtime error
Fix
Browse files
server.py
CHANGED
@@ -138,12 +138,16 @@ class LeaderboardServer:
|
|
138 |
"parameters",
|
139 |
"win_score",
|
140 |
]
|
141 |
-
df_order =
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
|
|
|
|
|
|
|
|
147 |
dataframe = dataframe[df_order]
|
148 |
attributes_map_word_to_header = {key: value["abbreviation"] for key, value in self.tasks_metadata.items()}
|
149 |
attributes_map_word_to_header.update(extra_attributes_map_word_to_header)
|
|
|
138 |
"parameters",
|
139 |
"win_score",
|
140 |
]
|
141 |
+
df_order = [
|
142 |
+
key
|
143 |
+
for key in dict.fromkeys(
|
144 |
+
first_attributes
|
145 |
+
+ list(self.tasks_metadata.keys())
|
146 |
+
+ list(dataframe.columns)
|
147 |
+
+ list(extra_attributes_map_word_to_header.keys())
|
148 |
+
).keys()
|
149 |
+
if key in dataframe.columns
|
150 |
+
]
|
151 |
dataframe = dataframe[df_order]
|
152 |
attributes_map_word_to_header = {key: value["abbreviation"] for key, value in self.tasks_metadata.items()}
|
153 |
attributes_map_word_to_header.update(extra_attributes_map_word_to_header)
|