Spaces:
Running
Running
Enabled to get Overall for make model_tournament_results_table
Browse files
server.py
CHANGED
|
@@ -261,7 +261,7 @@ class LeaderboardServer:
|
|
| 261 |
self._get_model_tournament_table(submission_id, category, to_csv=True) if not self.tournament_results_corrupted else pd.DataFrame(columns=['Corrupted, please check integrity']),
|
| 262 |
f"Tournament table - {self.submission_id_to_data[submission_id]['submission_metadata']['model_name'][:self.MAX_LENGTH_OF_MODEL_TITLE].replace('/', '_')} - {category}.csv",
|
| 263 |
)
|
| 264 |
-
for category in
|
| 265 |
}
|
| 266 |
for submission_id in submission_ids
|
| 267 |
}
|
|
@@ -439,9 +439,6 @@ class LeaderboardServer:
|
|
| 439 |
return copy.copy(self.tournament_dataframes[submission_id][category])
|
| 440 |
|
| 441 |
def _get_model_tournament_table(self, submission_id, category, to_csv=False):
|
| 442 |
-
if category == self.TASKS_CATEGORY_OVERALL:
|
| 443 |
-
return None
|
| 444 |
-
|
| 445 |
model_tournament_table = []
|
| 446 |
|
| 447 |
with self.var_lock.ro:
|
|
@@ -451,7 +448,7 @@ class LeaderboardServer:
|
|
| 451 |
match_results = {}
|
| 452 |
for task in self.tournament_results[submission_id][competitor_id]:
|
| 453 |
task_category = self.TASKS_METADATA[task]["category"]
|
| 454 |
-
if task_category
|
| 455 |
if to_csv:
|
| 456 |
match_results[task] = self.tournament_results[submission_id][competitor_id][task]["significant"]
|
| 457 |
else:
|
|
|
|
| 261 |
self._get_model_tournament_table(submission_id, category, to_csv=True) if not self.tournament_results_corrupted else pd.DataFrame(columns=['Corrupted, please check integrity']),
|
| 262 |
f"Tournament table - {self.submission_id_to_data[submission_id]['submission_metadata']['model_name'][:self.MAX_LENGTH_OF_MODEL_TITLE].replace('/', '_')} - {category}.csv",
|
| 263 |
)
|
| 264 |
+
for category in categories
|
| 265 |
}
|
| 266 |
for submission_id in submission_ids
|
| 267 |
}
|
|
|
|
| 439 |
return copy.copy(self.tournament_dataframes[submission_id][category])
|
| 440 |
|
| 441 |
def _get_model_tournament_table(self, submission_id, category, to_csv=False):
|
|
|
|
|
|
|
|
|
|
| 442 |
model_tournament_table = []
|
| 443 |
|
| 444 |
with self.var_lock.ro:
|
|
|
|
| 448 |
match_results = {}
|
| 449 |
for task in self.tournament_results[submission_id][competitor_id]:
|
| 450 |
task_category = self.TASKS_METADATA[task]["category"]
|
| 451 |
+
if category in (task_category, self.TASKS_CATEGORY_OVERALL):
|
| 452 |
if to_csv:
|
| 453 |
match_results[task] = self.tournament_results[submission_id][competitor_id][task]["significant"]
|
| 454 |
else:
|