Terry Zhuo
commited on
Commit
·
9946598
1
Parent(s):
2a1a6c1
fix roundup
Browse files- src/populate.py +1 -1
src/populate.py
CHANGED
@@ -42,7 +42,7 @@ def get_leaderboard_df(leaderboard_dataset: Dataset, cols: list):
|
|
42 |
df[AutoEvalColumn.moe.name] = df[AutoEvalColumn.moe.name].map(moe_map)
|
43 |
df[AutoEvalColumn.T.name] = df[AutoEvalColumn.type.name]
|
44 |
df[AutoEvalColumn.type.name] = df[AutoEvalColumn.type.name].map(type_map)
|
45 |
-
df[AutoEvalColumn.average.name] = df.apply(lambda x: (x[AutoEvalColumn.complete.name] + x[AutoEvalColumn.instruct.name]) / 2 if not pd.isna(x[AutoEvalColumn.complete.name]) and not pd.isna(x[AutoEvalColumn.instruct.name]) else None, axis=1)
|
46 |
df[AutoEvalColumn.size_range.name] = df[AutoEvalColumn.size.name].apply(lambda x: next((k for k, v in NUMERIC_INTERVALS.items() if x in v), "?"))
|
47 |
df = make_clickable_model(df, AutoEvalColumn.model.name, AutoEvalColumn.link.name)
|
48 |
df = df.sort_values(by=[AutoEvalColumn.complete.name], ascending=False)
|
|
|
42 |
df[AutoEvalColumn.moe.name] = df[AutoEvalColumn.moe.name].map(moe_map)
|
43 |
df[AutoEvalColumn.T.name] = df[AutoEvalColumn.type.name]
|
44 |
df[AutoEvalColumn.type.name] = df[AutoEvalColumn.type.name].map(type_map)
|
45 |
+
df[AutoEvalColumn.average.name] = df.apply(lambda x: round((x[AutoEvalColumn.complete.name] + x[AutoEvalColumn.instruct.name]) / 2, 1) if not pd.isna(x[AutoEvalColumn.complete.name]) and not pd.isna(x[AutoEvalColumn.instruct.name]) else None, axis=1)
|
46 |
df[AutoEvalColumn.size_range.name] = df[AutoEvalColumn.size.name].apply(lambda x: next((k for k, v in NUMERIC_INTERVALS.items() if x in v), "?"))
|
47 |
df = make_clickable_model(df, AutoEvalColumn.model.name, AutoEvalColumn.link.name)
|
48 |
df = df.sort_values(by=[AutoEvalColumn.complete.name], ascending=False)
|