Update space
Browse files- src/populate.py +2 -2
src/populate.py
CHANGED
|
@@ -18,7 +18,7 @@ def get_model_leaderboard_df(results_path: str, requests_path: str="", cols: lis
|
|
| 18 |
df = pd.DataFrame.from_records(all_data_json)
|
| 19 |
|
| 20 |
df = df[benchmark_cols]
|
| 21 |
-
print(df.head())
|
| 22 |
|
| 23 |
if rank_col: # if there is one col in rank_col, sort by that column and remove NaN values
|
| 24 |
df = df.dropna(subset=benchmark_cols)
|
|
@@ -27,7 +27,7 @@ def get_model_leaderboard_df(results_path: str, requests_path: str="", cols: lis
|
|
| 27 |
avg_rank = df.iloc[:, 1:].mean(axis=1) # we'll skip NaN, instrad of deleting the whole row
|
| 28 |
df["Average Rank"] = avg_rank
|
| 29 |
df = df.sort_values(by=["Average Rank"], ascending=True)
|
| 30 |
-
|
| 31 |
|
| 32 |
# df = df.sort_values(by=[AutoEvalColumn.score.name], ascending=True)
|
| 33 |
# df[AutoEvalColumn.rank.name] = df[AutoEvalColumn.score.name].rank(ascending=True, method="min")
|
|
|
|
| 18 |
df = pd.DataFrame.from_records(all_data_json)
|
| 19 |
|
| 20 |
df = df[benchmark_cols]
|
| 21 |
+
# print(df.head())
|
| 22 |
|
| 23 |
if rank_col: # if there is one col in rank_col, sort by that column and remove NaN values
|
| 24 |
df = df.dropna(subset=benchmark_cols)
|
|
|
|
| 27 |
avg_rank = df.iloc[:, 1:].mean(axis=1) # we'll skip NaN, instrad of deleting the whole row
|
| 28 |
df["Average Rank"] = avg_rank
|
| 29 |
df = df.sort_values(by=["Average Rank"], ascending=True)
|
| 30 |
+
df = df.fillna('--')
|
| 31 |
|
| 32 |
# df = df.sort_values(by=[AutoEvalColumn.score.name], ascending=True)
|
| 33 |
# df[AutoEvalColumn.rank.name] = df[AutoEvalColumn.score.name].rank(ascending=True, method="min")
|