loodvanniekerkginkgo commited on
Commit
4808b6b
·
1 Parent(s): a3fddce

Added test set constant value error

Browse files
Files changed (2) hide show
  1. app.py +16 -13
  2. constants.py +1 -0
app.py CHANGED
@@ -42,19 +42,22 @@ def format_leaderboard_table(df_results: pd.DataFrame, assay: str | None = None)
42
  # Cast submission_time to datetime
43
  df["submission_time"] = pd.to_datetime(df["submission_time"], errors="coerce")
44
  # Before the first deadline: Say we're busy evaluating
45
- df.loc[
46
- (df["dataset"] == "Heldout Test Set")
47
- & (df["spearman"] == "nan")
48
- & (df["submission_time"] <= FIRST_DEADLINE),
49
- "spearman",
50
- ] = "Busy evaluating first deadline"
51
- # After the first deadline: Evaluated at competition close
52
- df.loc[
53
- (df["dataset"] == "Heldout Test Set")
54
- & (df["spearman"] == "nan")
55
- & (df["submission_time"] > FIRST_DEADLINE),
56
- "spearman",
57
- ] = "N/A, evaluated at competition close"
 
 
 
58
 
59
  # Finally, rename columns for readability
60
  df = df.rename(columns=LEADERBOARD_COLUMNS_RENAME)
 
42
  # Cast submission_time to datetime
43
  df["submission_time"] = pd.to_datetime(df["submission_time"], errors="coerce")
44
  # Before the first deadline: Say we're busy evaluating
45
+ for metric in ["spearman", "top_10_recall"]:
46
+ if metric not in df.columns:
47
+ continue
48
+ df.loc[
49
+ (df["dataset"] == "Heldout Test Set")
50
+ & (df[metric] == "nan")
51
+ & (df["submission_time"] <= FIRST_DEADLINE),
52
+ metric,
53
+ ] = "Error: All predictions have a constant value"
54
+ # After the first deadline: Evaluated at competition close
55
+ df.loc[
56
+ (df["dataset"] == "Heldout Test Set")
57
+ & (df[metric] == "nan")
58
+ & (df["submission_time"] > FIRST_DEADLINE),
59
+ metric,
60
+ ] = "N/A, evaluated at competition close"
61
 
62
  # Finally, rename columns for readability
63
  df = df.rename(columns=LEADERBOARD_COLUMNS_RENAME)
constants.py CHANGED
@@ -101,5 +101,6 @@ BASELINE_USERNAMES = ["loodvanniekerkginkgo"]
101
  def LEADERBOARD_COLUMNS_RENAME_LIST(columns: list[str]) -> list[str]:
102
  return list(map(lambda x: LEADERBOARD_COLUMNS_RENAME.get(x, x), columns))
103
 
 
104
  # First deadline: 2025-10-14 23:59:59 EST
105
  FIRST_DEADLINE = pd.to_datetime("2025-10-14 23:59:59").tz_localize("US/Eastern")
 
101
  def LEADERBOARD_COLUMNS_RENAME_LIST(columns: list[str]) -> list[str]:
102
  return list(map(lambda x: LEADERBOARD_COLUMNS_RENAME.get(x, x), columns))
103
 
104
+
105
  # First deadline: 2025-10-14 23:59:59 EST
106
  FIRST_DEADLINE = pd.to_datetime("2025-10-14 23:59:59").tz_localize("US/Eastern")