pminervini commited on
Commit
fa6aeef
1 Parent(s): dd383e8
Files changed (1) hide show
  1. src/populate.py +7 -1
src/populate.py CHANGED
@@ -21,7 +21,13 @@ def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchm
21
 
22
  df = pd.DataFrame.from_records(all_data_json)
23
  df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False)
24
- df = df[cols].round(decimals=2)
 
 
 
 
 
 
25
 
26
  # filter out if any of the benchmarks have not been produced
27
  df = df[has_no_nan_values(df, benchmark_cols)]
 
21
 
22
  df = pd.DataFrame.from_records(all_data_json)
23
  df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False)
24
+
25
+ # df = df[cols].round(decimals=2)
26
+ for col in cols:
27
+ if col in df.columns:
28
+ df[col] = df[col].round(decimals=2)
29
+ else:
30
+ df[col] = 0.0
31
 
32
  # filter out if any of the benchmarks have not been produced
33
  df = df[has_no_nan_values(df, benchmark_cols)]