Update src/populate.py
Browse files- src/populate.py +6 -6
src/populate.py
CHANGED
@@ -17,20 +17,20 @@ def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchm
|
|
17 |
# df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False)
|
18 |
# df = df.sort_values(by=[AutoEvalColumn.task5.name], ascending=True)
|
19 |
|
20 |
-
df[AutoEvalColumn.
|
21 |
np.stack(
|
22 |
-
np.array(df[AutoEvalColumn.
|
23 |
).squeeze()
|
24 |
)
|
25 |
-
df[AutoEvalColumn.
|
26 |
np.stack(
|
27 |
-
np.array(df[AutoEvalColumn.
|
28 |
).squeeze()
|
29 |
)
|
30 |
|
31 |
|
32 |
-
mos_rank = df[AutoEvalColumn.
|
33 |
-
bitrate_rank = df[AutoEvalColumn.
|
34 |
df["Ranking"] = pd.Series((mos_rank + bitrate_rank)/2)
|
35 |
df = df.sort_values(by=["Ranking", AutoEvalColumn.task2.name], ascending=True)
|
36 |
df["Rank"] = df.groupby("Precision").cumcount() + 1
|
|
|
17 |
# df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False)
|
18 |
# df = df.sort_values(by=[AutoEvalColumn.task5.name], ascending=True)
|
19 |
|
20 |
+
df[AutoEvalColumn.task2.name] = pd.Series(
|
21 |
np.stack(
|
22 |
+
np.array(df[AutoEvalColumn.task2.name].values)
|
23 |
).squeeze()
|
24 |
)
|
25 |
+
df[AutoEvalColumn.task3.name] = pd.Series(
|
26 |
np.stack(
|
27 |
+
np.array(df[AutoEvalColumn.task3.name].values)
|
28 |
).squeeze()
|
29 |
)
|
30 |
|
31 |
|
32 |
+
mos_rank = df[AutoEvalColumn.task2.name].rank(method="max", numeric_only=True, ascending=True)
|
33 |
+
bitrate_rank = df[AutoEvalColumn.task3.name].rank(method="min", numeric_only=True, ascending=True)
|
34 |
df["Ranking"] = pd.Series((mos_rank + bitrate_rank)/2)
|
35 |
df = df.sort_values(by=["Ranking", AutoEvalColumn.task2.name], ascending=True)
|
36 |
df["Rank"] = df.groupby("Precision").cumcount() + 1
|