idolezal commited on
Commit
3bf4a90
ยท
1 Parent(s): 39ce08a

Prepare for more details from match

Browse files
Files changed (1) hide show
  1. server.py +7 -3
server.py CHANGED
@@ -221,9 +221,9 @@ class LeaderboardServer:
221
  df_css = x.copy()
222
  for c in df_css:
223
  for i in range(len(df_css.index)):
224
- if x[c].iloc[i] == True:
225
  df_css[c].iloc[i] = 'background-color: rgba(0, 255, 0, 0.1);'
226
- elif x[c].iloc[i] == False:
227
  df_css[c].iloc[i] = 'background-color: rgba(255, 0, 0, 0.1);'
228
  else:
229
  df_css[c].iloc[i] = ''
@@ -247,7 +247,11 @@ class LeaderboardServer:
247
  for task in self.tournament_results[submission_id][competitor_id]:
248
  task_category = self.TASKS_METADATA[task]["category"]
249
  if task_category == category:
250
- match_results[task] = bool(self.tournament_results[submission_id][competitor_id][task])
 
 
 
 
251
 
252
  model_link = data["metadata"]["link_to_model"]
253
  model_title = data["metadata"]["team_name"] + "/" + data["metadata"]["model_name"]
 
221
  df_css = x.copy()
222
  for c in df_css:
223
  for i in range(len(df_css.index)):
224
+ if x[c].iloc[i] == True or ">true<" in str(x[c].iloc[i]).lower():
225
  df_css[c].iloc[i] = 'background-color: rgba(0, 255, 0, 0.1);'
226
+ elif x[c].iloc[i] == False or ">false<" in str(x[c].iloc[i]).lower():
227
  df_css[c].iloc[i] = 'background-color: rgba(255, 0, 0, 0.1);'
228
  else:
229
  df_css[c].iloc[i] = ''
 
247
  for task in self.tournament_results[submission_id][competitor_id]:
248
  task_category = self.TASKS_METADATA[task]["category"]
249
  if task_category == category:
250
+ match_task_result_delta = 0.06167879330073067 # float
251
+ match_task_result_p_value = 0.0 # float
252
+ match_task_result_significant = str(self.tournament_results[submission_id][competitor_id][task]).lower() # originaly bool
253
+ match_task_result_details = f"delta: {match_task_result_delta}\np_value: {match_task_result_p_value}\nsignificant: {match_task_result_significant}"
254
+ match_results[task] = f'<abbr title={xmlQuoteAttr(match_task_result_details)}>{match_task_result_significant}</abbr>'
255
 
256
  model_link = data["metadata"]["link_to_model"]
257
  model_title = data["metadata"]["team_name"] + "/" + data["metadata"]["model_name"]