Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
xuanricheng
commited on
Commit
·
60c79d2
1
Parent(s):
b6b9254
set default eval reuslt as 0
Browse files
src/leaderboard/read_evals.py
CHANGED
@@ -83,10 +83,10 @@ class EvalResult:
|
|
83 |
continue
|
84 |
|
85 |
# We average all scores of a given metric (mostly for mmlu)
|
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 |
-
|
89 |
-
|
90 |
mean_acc = np.mean(accs)
|
91 |
results[task.benchmark] = mean_acc
|
92 |
|
|
|
83 |
continue
|
84 |
|
85 |
# We average all scores of a given metric (mostly for mmlu)
|
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 |
|