Spaces:
Running
Running
[email protected]
commited on
Commit
·
0d4fbe6
1
Parent(s):
75af8f6
update
Browse files
src/leaderboard/read_evals.py
CHANGED
@@ -73,11 +73,13 @@ class EvalResult:
|
|
73 |
|
74 |
# We average all scores of a given metric (not all metrics are present in all files)
|
75 |
accs = np.array([v.get(task.metric, None) for k, v in data["results"].items() if task.benchmark == k])
|
76 |
-
|
|
|
|
|
|
|
77 |
# if accs.size == 0:
|
78 |
# continue
|
79 |
print(accs)
|
80 |
-
mean_acc = np.nanmean(accs) * 100.0
|
81 |
# mean_acc = np.mean(accs) * 100.0
|
82 |
results[task.benchmark] = mean_acc
|
83 |
|
|
|
73 |
|
74 |
# We average all scores of a given metric (not all metrics are present in all files)
|
75 |
accs = np.array([v.get(task.metric, None) for k, v in data["results"].items() if task.benchmark == k])
|
76 |
+
if accs.size == 0 or any([acc is None for acc in accs]):
|
77 |
+
mean_acc = 0.0
|
78 |
+
else:
|
79 |
+
mean_acc = np.nanmean(accs) * 100.0
|
80 |
# if accs.size == 0:
|
81 |
# continue
|
82 |
print(accs)
|
|
|
83 |
# mean_acc = np.mean(accs) * 100.0
|
84 |
results[task.benchmark] = mean_acc
|
85 |
|