Behnamm commited on
Commit
7a40a84
1 Parent(s): 6af600d

Update src/populate.py

Browse files
Files changed (1) hide show
  1. src/populate.py +5 -0
src/populate.py CHANGED
@@ -14,12 +14,17 @@ def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchm
14
  all_data_json = [v.to_dict() for v in raw_data]
15
 
16
  df = pd.DataFrame.from_records(all_data_json)
 
17
  df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False) if AutoEvalColumn.average.name in df.columns else df
 
18
  filtered_cols = [col for col in cols if col in df.columns]
 
19
  df = df[filtered_cols].round(decimals=2)
 
20
 
21
  # filter out if any of the benchmarks have not been produced
22
  filtered_benchmark_cols = [col for col in benchmark_cols if col in df.columns]
 
23
  df = df[has_no_nan_values(df, filtered_benchmark_cols)]
24
  return df
25
 
 
14
  all_data_json = [v.to_dict() for v in raw_data]
15
 
16
  df = pd.DataFrame.from_records(all_data_json)
17
+ print(df)
18
  df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False) if AutoEvalColumn.average.name in df.columns else df
19
+ print(df.columns)
20
  filtered_cols = [col for col in cols if col in df.columns]
21
+ print(filtered_cols)
22
  df = df[filtered_cols].round(decimals=2)
23
+ print(df)
24
 
25
  # filter out if any of the benchmarks have not been produced
26
  filtered_benchmark_cols = [col for col in benchmark_cols if col in df.columns]
27
+ print(filtered_benchmark_cols)
28
  df = df[has_no_nan_values(df, filtered_benchmark_cols)]
29
  return df
30