Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
•
c6b775f
1
Parent(s):
d2179b0
Set to 0 if metric not found (#220)
Browse files- Set to 0 if metric not found (c29646af38c8325ed7f4c618120240034e92be95)
Co-authored-by: Joshua <[email protected]>
src/auto_leaderboard/load_results.py
CHANGED
@@ -91,7 +91,7 @@ def parse_eval_result(json_filepath: str) -> Tuple[str, list[dict]]:
|
|
91 |
|
92 |
eval_results = []
|
93 |
for benchmark, metric in zip(BENCHMARKS, METRICS):
|
94 |
-
accs = np.array([v
|
95 |
if accs.size == 0:
|
96 |
continue
|
97 |
mean_acc = np.mean(accs) * 100.0
|
|
|
91 |
|
92 |
eval_results = []
|
93 |
for benchmark, metric in zip(BENCHMARKS, METRICS):
|
94 |
+
accs = np.array([v.get(metric, 0) for k, v in data["results"].items() if benchmark in k])
|
95 |
if accs.size == 0:
|
96 |
continue
|
97 |
mean_acc = np.mean(accs) * 100.0
|