debjitpaul commited on
Commit Β·
1f21b1a
1
Parent(s): b362858
Rank submissions by F1 globally; drop Category and Scaffold columns
Browse files
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
|
| 145 |
if not submissions:
|
| 146 |
return pd.DataFrame(columns=[
|
| 147 |
-
"
|
| 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 |
-
#
|
| 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=["
|
| 189 |
-
ascending=[
|
| 190 |
na_position="last",
|
| 191 |
-
).
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
-
"
|
| 300 |
-
"
|
| 301 |
-
"
|
| 302 |
-
"
|
| 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()
|