Spaces:
Runtime error
Runtime error
Create new `self.tournament_results` more effectively
Browse files
server.py
CHANGED
@@ -259,13 +259,16 @@ class LeaderboardServer:
|
|
259 |
|
260 |
gr.Info('Running tournament...', duration=15)
|
261 |
with self.var_lock.rw:
|
262 |
-
self.tournament_results = {
|
263 |
-
|
|
|
|
|
264 |
with self.var_lock.ro:
|
265 |
file = self.submission_id_to_file[submission_id]
|
266 |
tournament_results = self.start_tournament(submission_id, file)
|
267 |
with self.var_lock.rw:
|
268 |
self.tournament_results = tournament_results
|
|
|
269 |
|
270 |
gr.Info('Uploading tournament results...', duration=5)
|
271 |
if self.tournament_results:
|
|
|
259 |
|
260 |
gr.Info('Running tournament...', duration=15)
|
261 |
with self.var_lock.rw:
|
262 |
+
self.tournament_results = {}
|
263 |
+
submission_ids_backup = self.submission_ids
|
264 |
+
self.submission_ids = set()
|
265 |
+
for submission_id in submission_ids_backup:
|
266 |
with self.var_lock.ro:
|
267 |
file = self.submission_id_to_file[submission_id]
|
268 |
tournament_results = self.start_tournament(submission_id, file)
|
269 |
with self.var_lock.rw:
|
270 |
self.tournament_results = tournament_results
|
271 |
+
self.submission_ids.add(submission_id)
|
272 |
|
273 |
gr.Info('Uploading tournament results...', duration=5)
|
274 |
if self.tournament_results:
|