Spaces:
Runtime error
Runtime error
Better info
Browse files
app.py
CHANGED
@@ -59,7 +59,7 @@ def process_submission(*inputs):
|
|
59 |
metadata = SUBMISSION_INPUTS - {"submission_file"}
|
60 |
metadata = {key: inputs[key] for key in metadata}
|
61 |
|
62 |
-
gr.Info('Submission valid,
|
63 |
|
64 |
pre_submit = leaderboard_server.prepare_model_for_submission(inputs["submission_file"], metadata)
|
65 |
except ValueError as err:
|
|
|
59 |
metadata = SUBMISSION_INPUTS - {"submission_file"}
|
60 |
metadata = {key: inputs[key] for key in metadata}
|
61 |
|
62 |
+
gr.Info('Submission valid, going to queue for the tournament...')
|
63 |
|
64 |
pre_submit = leaderboard_server.prepare_model_for_submission(inputs["submission_file"], metadata)
|
65 |
except ValueError as err:
|
server.py
CHANGED
@@ -267,6 +267,7 @@ class LeaderboardServer:
|
|
267 |
}
|
268 |
|
269 |
rest_of_competitors = list(self.submission_ids - {new_submission_id}) # without self
|
|
|
270 |
|
271 |
result_url = {}
|
272 |
result_inverse_url = {}
|
@@ -291,6 +292,9 @@ class LeaderboardServer:
|
|
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
|
@@ -354,10 +358,11 @@ class LeaderboardServer:
|
|
354 |
while True:
|
355 |
with self.pre_submit_lock:
|
356 |
if self.pre_submit == None:
|
|
|
357 |
tournament_results = self.start_tournament(submission_id, file)
|
358 |
self.pre_submit = self.PreSubmit(tournament_results, submission_id, file)
|
359 |
break
|
360 |
-
gr.Info("Waiting in queue...")
|
361 |
time.sleep(10)
|
362 |
|
363 |
return self.pre_submit
|
|
|
267 |
}
|
268 |
|
269 |
rest_of_competitors = list(self.submission_ids - {new_submission_id}) # without self
|
270 |
+
num_of_competitors = len(rest_of_competitors)
|
271 |
|
272 |
result_url = {}
|
273 |
result_inverse_url = {}
|
|
|
292 |
new_tournament[competitor_id][new_submission_id] = {
|
293 |
task: data["significant"] for task, data in result_inverse.items()
|
294 |
}
|
295 |
+
|
296 |
+
gr.Info(f"Tournament: {(num_of_competitors - len(rest_of_competitors)) * 100 // num_of_competitors}% is done")
|
297 |
+
|
298 |
return new_tournament
|
299 |
|
300 |
@staticmethod
|
|
|
358 |
while True:
|
359 |
with self.pre_submit_lock:
|
360 |
if self.pre_submit == None:
|
361 |
+
gr.Info('Running tournament...', duration=15)
|
362 |
tournament_results = self.start_tournament(submission_id, file)
|
363 |
self.pre_submit = self.PreSubmit(tournament_results, submission_id, file)
|
364 |
break
|
365 |
+
gr.Info("Waiting in queue...", duration=5)
|
366 |
time.sleep(10)
|
367 |
|
368 |
return self.pre_submit
|