debjitpaul commited on
Commit
1f21b1a
Β·
1 Parent(s): b362858

Rank submissions by F1 globally; drop Category and Scaffold columns

Browse files
Files changed (1) hide show
  1. app.py +16 -17
app.py CHANGED
@@ -141,10 +141,10 @@ def _access_label(access: str | None) -> str:
141
 
142
 
143
  def leaderboard_dataframe(submissions: list[dict[str, Any]]) -> pd.DataFrame:
144
- """Build a single unified leaderboard DataFrame from every submission file."""
145
  if not submissions:
146
  return pd.DataFrame(columns=[
147
- "Category", "Agent", "Model", "Access", "Scaffold",
148
  "F1", "Precision", "Recall", "EM", "LLM Judge",
149
  "Org", "Date",
150
  ])
@@ -156,11 +156,9 @@ def leaderboard_dataframe(submissions: list[dict[str, Any]]) -> pd.DataFrame:
156
  efficiency = s.get("efficiency", {})
157
 
158
  rows.append({
159
- "Category": meta.get("category", "Submission"),
160
  "Agent": meta.get("agent_name", "β€”"),
161
  "Model": meta.get("base_model", "β€”"),
162
  "Access": _access_label(meta.get("access")),
163
- "Scaffold": meta.get("scaffold", "β€”"),
164
  "F1": overall.get("f1"),
165
  "Precision": overall.get("precision"),
166
  "Recall": overall.get("recall"),
@@ -180,15 +178,16 @@ def leaderboard_dataframe(submissions: list[dict[str, Any]]) -> pd.DataFrame:
180
  if col in df.columns and df[col].isna().all():
181
  df = df.drop(columns=[col])
182
 
183
- # Category order: LLM Baseline first, Agent Framework second, everything
184
- # else after. Within each category, sort by LLM Judge desc then F1 desc.
185
- cat_order = {"LLM Baseline": 0, "Agent Framework": 1}
186
- df["__cat_order"] = df["Category"].map(cat_order).fillna(2)
187
  df = df.sort_values(
188
- by=["__cat_order", "LLM Judge", "F1"],
189
- ascending=[True, False, False],
190
  na_position="last",
191
- ).drop(columns=["__cat_order"]).reset_index(drop=True)
 
 
 
 
192
 
193
  return df
194
 
@@ -295,11 +294,11 @@ def build_app() -> gr.Blocks:
295
  # -------------------------------------------------------------
296
  with gr.Tab("πŸ† Leaderboard"):
297
  gr.Markdown(
298
- "Results on the **DeepSynth test set** (80 tasks, Pass@1). "
299
- "F1 / Precision / Recall measure prediction quality against gold answers; "
300
- "**LLM Judge** reports average precision under semantic matching. "
301
- "Submissions are grouped into LLM Baselines (no tools, no scaffold) and "
302
- "Agent Frameworks (tool-using agents).",
303
  elem_classes=["section-header"],
304
  )
305
  gr.Dataframe(
@@ -445,4 +444,4 @@ def build_app() -> gr.Blocks:
445
 
446
 
447
  if __name__ == "__main__":
448
- build_app().launch()
 
141
 
142
 
143
  def leaderboard_dataframe(submissions: list[dict[str, Any]]) -> pd.DataFrame:
144
+ """Build a single unified leaderboard DataFrame, globally ranked by F1 desc."""
145
  if not submissions:
146
  return pd.DataFrame(columns=[
147
+ "Rank", "Agent", "Model", "Access",
148
  "F1", "Precision", "Recall", "EM", "LLM Judge",
149
  "Org", "Date",
150
  ])
 
156
  efficiency = s.get("efficiency", {})
157
 
158
  rows.append({
 
159
  "Agent": meta.get("agent_name", "β€”"),
160
  "Model": meta.get("base_model", "β€”"),
161
  "Access": _access_label(meta.get("access")),
 
162
  "F1": overall.get("f1"),
163
  "Precision": overall.get("precision"),
164
  "Recall": overall.get("recall"),
 
178
  if col in df.columns and df[col].isna().all():
179
  df = df.drop(columns=[col])
180
 
181
+ # Global ranking by F1 desc, with LLM Judge as tiebreaker.
 
 
 
182
  df = df.sort_values(
183
+ by=["F1", "LLM Judge"],
184
+ ascending=[False, False],
185
  na_position="last",
186
+ ).reset_index(drop=True)
187
+
188
+ # Assign rank medals for the top 3, numeric rank for everyone else.
189
+ medals = {0: "πŸ₯‡ 1", 1: "πŸ₯ˆ 2", 2: "πŸ₯‰ 3"}
190
+ df.insert(0, "Rank", [medals.get(i, str(i + 1)) for i in range(len(df))])
191
 
192
  return df
193
 
 
294
  # -------------------------------------------------------------
295
  with gr.Tab("πŸ† Leaderboard"):
296
  gr.Markdown(
297
+ "Results on the **DeepSynth test set** (80 tasks, Pass@1), "
298
+ "ranked by **F1** score (LLM Judge used as tiebreaker). "
299
+ "F1 / Precision / Recall measure prediction quality against gold "
300
+ "answers; **LLM Judge** reports average precision under semantic "
301
+ "matching. πŸ”’ = closed model, πŸ”“ = open-weights.",
302
  elem_classes=["section-header"],
303
  )
304
  gr.Dataframe(
 
444
 
445
 
446
  if __name__ == "__main__":
447
+ build_app().launch()