future-xy commited on
Commit
21309a8
1 Parent(s): 794e78c

fix empty df bug

Browse files
Files changed (1) hide show
  1. src/populate.py +4 -3
src/populate.py CHANGED
@@ -60,10 +60,11 @@ def get_leaderboard_df(results_path: str,
60
  # if AutoEvalColumn.average.name in df:
61
  # df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False)
62
 
63
- df = df[cols].round(decimals=2)
 
64
 
65
- # filter out if any of the benchmarks have not been produced
66
- df = df[has_no_nan_values(df, benchmark_cols)]
67
 
68
  return raw_data, df
69
 
 
60
  # if AutoEvalColumn.average.name in df:
61
  # df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False)
62
 
63
+ if not df.empty:
64
+ df = df[cols].round(decimals=2)
65
 
66
+ # filter out if any of the benchmarks have not been produced
67
+ df = df[has_no_nan_values(df, benchmark_cols)]
68
 
69
  return raw_data, df
70