loodvanniekerkginkgo commited on
Commit
177a597
·
1 Parent(s): 7ac33bb

Adding string type

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -20,7 +20,13 @@ def format_leaderboard_table(df_results: pd.DataFrame, assay: str | None = None)
20
  if assay is not None:
21
  df = df[df["assay"] == assay]
22
  df = df[LEADERBOARD_DISPLAY_COLUMNS]
23
- return df.sort_values(by="spearman", ascending=False)
 
 
 
 
 
 
24
 
25
 
26
  def get_leaderboard_object(assay: str | None = None):
 
20
  if assay is not None:
21
  df = df[df["assay"] == assay]
22
  df = df[LEADERBOARD_DISPLAY_COLUMNS]
23
+ df = df.sort_values(by="spearman", ascending=False)
24
+ # After sorting, just add the reason for excluding heldout test set
25
+ # Note: We can also just say the following as a text box at the bottom of the leaderboard: "Note: Results for the Heldout Test Set are only evaluated at competition close"
26
+ # Convert spearman column to string to avoid dtype incompatibility when assigning text
27
+ df["spearman"] = df["spearman"].astype(str)
28
+ df.loc[(df["dataset"] == "Heldout Test Set") & (df["spearman"] == "nan"), "spearman"] = "N/A, evaluated at competition close"
29
+ return df
30
 
31
 
32
  def get_leaderboard_object(assay: str | None = None):