xuanricheng commited on
Commit
de1b836
1 Parent(s): 60c79d2

udpate get result

Browse files
Files changed (1) hide show
  1. src/leaderboard/read_evals.py +2 -2
src/leaderboard/read_evals.py CHANGED
@@ -86,8 +86,8 @@ class EvalResult:
86
  # accs = np.array([v.get(task.metric, None) for k, v in data["results"].items() if task.benchmark in k])
87
  # if accs.size == 0 or any([acc is None for acc in accs]):
88
  # continue
89
- accs = [v.get(task.metric, 0) if task.benchmark in k else 0 for k, v in data["results"].items()]
90
- mean_acc = np.mean(accs)
91
  results[task.benchmark] = mean_acc
92
 
93
  return self(
 
86
  # accs = np.array([v.get(task.metric, None) for k, v in data["results"].items() if task.benchmark in k])
87
  # if accs.size == 0 or any([acc is None for acc in accs]):
88
  # continue
89
+ accs = [v.get(task.metric, 0) for k, v in data["results"].items() if task.benchmark in k]
90
+ mean_acc = np.mean(accs) if len(accs) > 0 else 0
91
  results[task.benchmark] = mean_acc
92
 
93
  return self(