idolezal commited on
Commit
7e24376
1 Parent(s): bf47515

Order of `match_task_result_details` attributes

Browse files
Files changed (1) hide show
  1. server.py +2 -1
server.py CHANGED
@@ -307,7 +307,8 @@ class LeaderboardServer:
307
  for task in self.tournament_results[submission_id][competitor_id]:
308
  task_category = self.TASKS_METADATA[task]["category"]
309
  if task_category == category:
310
- match_task_result_details = copy.deepcopy(self.tournament_results[submission_id][competitor_id][task])
 
311
  match_task_result_details["significant"] = str(match_task_result_details["significant"]).lower() # originaly bool
312
  match_task_result_significant = match_task_result_details["significant"]
313
  match_task_result_details = "\n".join(f"{k}: {v}" for k, v in match_task_result_details.items())
 
307
  for task in self.tournament_results[submission_id][competitor_id]:
308
  task_category = self.TASKS_METADATA[task]["category"]
309
  if task_category == category:
310
+ match_task_result_details = dict.fromkeys(["significant", "p_value"]) # order has impact to sorting DataFrame
311
+ match_task_result_details.update(copy.deepcopy(self.tournament_results[submission_id][competitor_id][task]))
312
  match_task_result_details["significant"] = str(match_task_result_details["significant"]).lower() # originaly bool
313
  match_task_result_significant = match_task_result_details["significant"]
314
  match_task_result_details = "\n".join(f"{k}: {v}" for k, v in match_task_result_details.items())