idolezal commited on
Commit
11d85cb
β€’
1 Parent(s): f0196fa

Fix variable name task_score

Browse files
Files changed (1) hide show
  1. server.py +3 -3
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
- win_score = num_of_wins / num_of_competitors # TODO: if num_of_competitors > 0 else ???
132
- win_score.setdefault(task_category, []).append(win_score)
133
 
134
  if category == task_category:
135
- local_results[task] = win_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)
 
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)