Spaces:
Building
on
CPU Upgrade
Building
on
CPU Upgrade
Update src/populate.py
Browse files- src/populate.py +9 -0
src/populate.py
CHANGED
@@ -13,10 +13,19 @@ def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchm
|
|
13 |
raw_data = get_raw_eval_results(results_path, requests_path)
|
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)
|
18 |
df = df[cols].round(decimals=2)
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
# filter out if any of the benchmarks have not been produced
|
21 |
df = df[has_no_nan_values(df, benchmark_cols)]
|
22 |
return df
|
|
|
13 |
raw_data = get_raw_eval_results(results_path, requests_path)
|
14 |
all_data_json = [v.to_dict() for v in raw_data]
|
15 |
|
16 |
+
print("Keys in the first dictionary:")
|
17 |
+
print(list(all_data_json[0].keys()))
|
18 |
+
|
19 |
df = pd.DataFrame.from_records(all_data_json)
|
20 |
# df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False)
|
21 |
df = df[cols].round(decimals=2)
|
22 |
|
23 |
+
print("Columns in the DataFrame:")
|
24 |
+
print(df.columns.tolist())
|
25 |
+
|
26 |
+
print("Requested columns:")
|
27 |
+
print(cols)
|
28 |
+
|
29 |
# filter out if any of the benchmarks have not been produced
|
30 |
df = df[has_no_nan_values(df, benchmark_cols)]
|
31 |
return df
|