Spaces:
Running
Running
Fix variable name task_score
Browse files
server.py
CHANGED
@@ -128,11 +128,11 @@ class LeaderboardServer:
|
|
128 |
num_of_competitors += 1
|
129 |
if tournament_results[submission_id][competitor_id][task]:
|
130 |
num_of_wins += 1
|
131 |
-
|
132 |
-
win_score.setdefault(task_category, []).append(
|
133 |
|
134 |
if category == task_category:
|
135 |
-
local_results[task] =
|
136 |
for metric in VISIBLE_METRICS:
|
137 |
visible_metrics_map_word_to_header[task + "_" + metric] = self.tasks_metadata[task]["abbreviation"] + " " + metric
|
138 |
metric_value = data['results'][task].get(metric)
|
|
|
128 |
num_of_competitors += 1
|
129 |
if tournament_results[submission_id][competitor_id][task]:
|
130 |
num_of_wins += 1
|
131 |
+
task_score = num_of_wins / num_of_competitors # TODO: if num_of_competitors > 0 else ???
|
132 |
+
win_score.setdefault(task_category, []).append(task_score)
|
133 |
|
134 |
if category == task_category:
|
135 |
+
local_results[task] = task_score
|
136 |
for metric in VISIBLE_METRICS:
|
137 |
visible_metrics_map_word_to_header[task + "_" + metric] = self.tasks_metadata[task]["abbreviation"] + " " + metric
|
138 |
metric_value = data['results'][task].get(metric)
|