yzabc007 commited on
Commit
bbcf980
1 Parent(s): 2566764

Update space

Browse files
src/display/utils.py CHANGED
@@ -60,6 +60,8 @@ for domain in Domains:
60
  auto_eval_column_dict.append(["organization", ColumnContent, field(default_factory=lambda: ColumnContent("Organization", "str", False))])
61
  auto_eval_column_dict.append(["knowledge_cutoff", ColumnContent, field(default_factory=lambda: ColumnContent("Knowledge cutoff", "str", False))])
62
  auto_eval_column_dict.append(["score", ColumnContent, field(default_factory=lambda: ColumnContent("Score", "number", True))])
 
 
63
 
64
  for task in Tasks:
65
  auto_eval_column_dict.append([task.name, ColumnContent, field(default_factory=lambda: ColumnContent(task.value.col_name, "number", True))])
 
60
  auto_eval_column_dict.append(["organization", ColumnContent, field(default_factory=lambda: ColumnContent("Organization", "str", False))])
61
  auto_eval_column_dict.append(["knowledge_cutoff", ColumnContent, field(default_factory=lambda: ColumnContent("Knowledge cutoff", "str", False))])
62
  auto_eval_column_dict.append(["score", ColumnContent, field(default_factory=lambda: ColumnContent("Score", "number", True))])
63
+ auto_eval_column_dict.append(["rank", ColumnContent, field(default_factory=lambda: ColumnContent("Rank", "number", True))])
64
+
65
 
66
  for task in Tasks:
67
  auto_eval_column_dict.append([task.name, ColumnContent, field(default_factory=lambda: ColumnContent(task.value.col_name, "number", True))])
src/leaderboard/read_evals.py CHANGED
@@ -60,6 +60,7 @@ class ModelResult:
60
  data_dict = {
61
  # "eval_name": self.eval_name, # not a column, just a save name,
62
  # AutoEvalColumn.model.name: make_clickable_model(self.full_model),
 
63
  AutoEvalColumn.model.name: self.model,
64
  AutoEvalColumn.score.name: self.results[Domains.dim0.value.dimension],
65
  AutoEvalColumn.license.name: self.license,
 
60
  data_dict = {
61
  # "eval_name": self.eval_name, # not a column, just a save name,
62
  # AutoEvalColumn.model.name: make_clickable_model(self.full_model),
63
+ AutoEvalColumn.rank.name: None, # placeholder for the rank
64
  AutoEvalColumn.model.name: self.model,
65
  AutoEvalColumn.score.name: self.results[Domains.dim0.value.dimension],
66
  AutoEvalColumn.license.name: self.license,
src/populate.py CHANGED
@@ -15,6 +15,7 @@ def get_model_leaderboard_df(results_path: str, requests_path: str="", cols: lis
15
 
16
  df = pd.DataFrame.from_records(all_data_json)
17
  df = df.sort_values(by=[AutoEvalColumn.score.name], ascending=True)
 
18
  # print(cols) # []
19
  # print(df.columns) # ['eval_name', 'Model', 'Hub License', 'Organization', 'Knowledge cutoff', 'Overall']
20
  # exit()
 
15
 
16
  df = pd.DataFrame.from_records(all_data_json)
17
  df = df.sort_values(by=[AutoEvalColumn.score.name], ascending=True)
18
+ df[AutoEvalColumn.rank.name] = df[AutoEvalColumn.score.name].rank(ascending=True, method="min")
19
  # print(cols) # []
20
  # print(df.columns) # ['eval_name', 'Model', 'Hub License', 'Organization', 'Knowledge cutoff', 'Overall']
21
  # exit()