ftshijt commited on
Commit
6f6ca1d
1 Parent(s): 1615fec

Update src/populate.py

Browse files
Files changed (1) hide show
  1. src/populate.py +3 -1
src/populate.py CHANGED
@@ -32,9 +32,11 @@ def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchm
32
  mos_rank = df[AutoEvalColumn.task2.name].rank(method="min", numeric_only=True, ascending=False)
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
37
  df.pop("Ranking")
 
38
 
39
 
40
  df = df[cols].round(decimals=2)
 
32
  mos_rank = df[AutoEvalColumn.task2.name].rank(method="min", numeric_only=True, ascending=False)
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["revert_task2"] = -df[AutoEvalColumn.task2.name]
36
+ df = df.sort_values(by=["Ranking", "revert_task2"], ascending=True)
37
  df["Rank"] = df.groupby("Precision").cumcount() + 1
38
  df.pop("Ranking")
39
+ df.pop("revert_task2")
40
 
41
 
42
  df = df[cols].round(decimals=2)