Spaces:
Sleeping
Sleeping
haiengchuihaian
commited on
Commit
·
2c16853
1
Parent(s):
cc5253d
test
Browse files- src/populate.py +4 -3
src/populate.py
CHANGED
@@ -16,12 +16,13 @@ def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchm
|
|
16 |
df = pd.DataFrame.from_records(all_data_json)
|
17 |
print(df)
|
18 |
print(AutoEvalColumn.average.name)
|
19 |
-
df
|
|
|
20 |
|
21 |
-
|
22 |
|
23 |
# filter out if any of the benchmarks have not been produced
|
24 |
-
|
25 |
return raw_data, df
|
26 |
|
27 |
|
|
|
16 |
df = pd.DataFrame.from_records(all_data_json)
|
17 |
print(df)
|
18 |
print(AutoEvalColumn.average.name)
|
19 |
+
if df != {}:
|
20 |
+
df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False)
|
21 |
|
22 |
+
df = df[cols].round(decimals=2)
|
23 |
|
24 |
# filter out if any of the benchmarks have not been produced
|
25 |
+
df = df[has_no_nan_values(df, benchmark_cols)]
|
26 |
return raw_data, df
|
27 |
|
28 |
|