Spaces:
Running
Running
Send more task for remote check significance
Browse files
server.py
CHANGED
|
@@ -266,19 +266,31 @@ class LeaderboardServer:
|
|
| 266 |
task: False for task in self.tasks_metadata.keys()
|
| 267 |
}
|
| 268 |
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 272 |
|
| 273 |
-
|
| 274 |
-
|
|
|
|
| 275 |
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 282 |
return new_tournament
|
| 283 |
|
| 284 |
@staticmethod
|
|
|
|
| 266 |
task: False for task in self.tasks_metadata.keys()
|
| 267 |
}
|
| 268 |
|
| 269 |
+
rest_of_competitors = list(self.submission_ids - {new_submission_id}) # without self
|
| 270 |
+
|
| 271 |
+
result_url = {}
|
| 272 |
+
result_inverse_url = {}
|
| 273 |
+
|
| 274 |
+
while rest_of_competitors:
|
| 275 |
+
next_competitors = []
|
| 276 |
+
while rest_of_competitors:
|
| 277 |
+
if len(next_competitors) < 5: # 5*2==10 tasks
|
| 278 |
+
next_competitors.append(rest_of_competitors.pop())
|
| 279 |
|
| 280 |
+
for competitor_id in next_competitors:
|
| 281 |
+
result_url[competitor_id] = check_significance_send_task(new_model_file, self.submission_id_to_file[competitor_id])
|
| 282 |
+
result_inverse_url[competitor_id] = check_significance_send_task(self.submission_id_to_file[competitor_id], new_model_file)
|
| 283 |
|
| 284 |
+
for competitor_id in next_competitors:
|
| 285 |
+
result = check_significance_wait_for_result(result_url.pop(competitor_id))
|
| 286 |
+
result_inverse = check_significance_wait_for_result(result_inverse_url.pop(competitor_id))
|
| 287 |
+
|
| 288 |
+
new_tournament[new_submission_id][competitor_id] = {
|
| 289 |
+
task: data["significant"] for task, data in result.items()
|
| 290 |
+
}
|
| 291 |
+
new_tournament[competitor_id][new_submission_id] = {
|
| 292 |
+
task: data["significant"] for task, data in result_inverse.items()
|
| 293 |
+
}
|
| 294 |
return new_tournament
|
| 295 |
|
| 296 |
@staticmethod
|