Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions .agents/skills/pwc-cron-health/references/job-probes.md

Large diffs are not rendered by default.

25 changes: 17 additions & 8 deletions .github/workflows/scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,9 @@ creates papers, so unreviewed labels and unresolved papers are logged as
warnings. It creates missing mapped rows, revises a row's accuracy when Vals
changes it (values that round to the published precision are unchanged),
adopts matching hand-imported rows, and renames a mislabelled hand-imported
row once (`renamed_from`, only when its score matches). Managed rows that drop
off the leaderboard are reported, never deleted.
row once (`renamed_from`, only when its score matches). Managed rows whose entry drops
off the leaderboard are deleted (logged as `<job>_deleted`); rows carrying
reviewer notes are kept and reported as `missing_upstream`.

`sync_frontiercs_2.py` reads the `MODELS`, `PASS`, `ECI`, and `UPDATED`
constants from https://frontier-cs.org/assets/js/fcs2-data.js (the
Expand Down Expand Up @@ -504,8 +505,12 @@ identities in `backend/services/carbon_board_identities.py`; other names are
auto-matched or handed to the release radar, and a board's `excluded` names
(partial runs, non-standard setups) are skipped. The engine keeps one row per
catalog model and harness (the best upstream setting), adopts hand-imported
rows for the same model, never creates papers, and reports managed rows that
leave the leaderboard instead of deleting them.
rows for the same model, and never creates papers. A managed row whose upstream
entry leaves the leaderboard is deleted (`<job>_deleted`); a row carrying
reviewer notes is kept and reported as `missing_upstream`. The three Artificial
Analysis boards (CritPt, CritPt v2, Terminal-Bench-Science) set
`retire_missing=False`: AA stops charting older models without restating their
scores, so their rows are reported, never deleted.

`sync_surge_chartography.py` parses the server-rendered "Chartography
Leaderboard" block on https://surgehq.ai/benchmarks/chartography (provider,
Expand All @@ -520,8 +525,9 @@ papers, so unreviewed labels and unresolved papers are logged as warnings;
Vision (experimental)). It creates missing mapped rows, revises a row's score
when Surge changes it (values that round to the published precision are
unchanged), and adopts matching hand-imported rows, keeping their notes,
`is_open`, `hf_model_url`, and `num_parameters`. Managed rows that drop off the
leaderboard are reported, never deleted. The with-tools `chartography`
`is_open`, `hf_model_url`, and `num_parameters`. Managed rows whose entry drops
off the leaderboard are deleted (logged as `<job>_deleted`); rows carrying
reviewer notes are kept and reported as `missing_upstream`. The with-tools `chartography`
benchmark is curated by hand and never touched.

`sync_swe_marathon.py` keeps the `swe-marathon` benchmark on task
Expand Down Expand Up @@ -586,8 +592,11 @@ job never creates papers, so unreviewed labels and unresolved papers are
logged as warnings. It creates missing mapped rows, revises a row's score and
methodology when the leaderboard changes (a stored value that rounds to the
published precision is unchanged), and adopts matching hand-imported rows by
prefixing their methodology. Managed rows that drop off the leaderboard are
reported, never deleted, and rows outside the managed set are never touched.
prefixing their methodology. Managed rows whose entry drops
off the leaderboard are deleted (logged as `<job>_deleted`); rows carrying
reviewer notes are kept and reported as `missing_upstream`. A row
that also carries the other track's metric loses only this track's score, and
rows outside the managed set are never touched.

`sync_hf_organizations.py` runs daily as an append-only reconciliation backstop
for the strict 21-organization manifest. It validates HF organization pages,
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/scripts/utils/live_leaderboard_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def run(self):
("unreviewed", stats.unreviewed),
("missing_papers", stats.missing_papers),
("missing_upstream", stats.missing_upstream),
("deleted", stats.deleted),
):
if values:
self.logger.warning(
Expand Down
3 changes: 3 additions & 0 deletions backend/services/carbon_board_syncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,7 @@ def _fetching(
url=CRITPT_URL,
task_slug="scientific-reasoning",
dataset_slug="critpt",
retire_missing=False,
metric="Accuracy",
identities=IDENTITIES["critpt"],
min_selected=10,
Expand All @@ -757,6 +758,7 @@ def _fetching(
url=CRITPT_V2_URL,
task_slug="scientific-reasoning",
dataset_slug="critpt-v2",
retire_missing=False,
metric="Accuracy",
identities=IDENTITIES["critpt-v2"],
min_selected=10,
Expand All @@ -771,6 +773,7 @@ def _fetching(
url=TERMINAL_BENCH_SCIENCE_URL,
task_slug="scientific-reasoning",
dataset_slug="terminal-bench-science-0-1",
retire_missing=False,
metric="Accuracy",
identities=IDENTITIES["terminal-bench-science-0-1"],
min_selected=10,
Expand Down
66 changes: 53 additions & 13 deletions backend/services/live_leaderboard_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

A board module parses its official leaderboard into ``LeaderboardEntry`` rows
and declares a reviewed ``ModelIdentity`` map; this engine resolves papers,
hands unreviewed names to the release radar, and creates or revises the rows
it owns. Like every live sync it never creates papers and never deletes rows:
a managed row that leaves the upstream board is only reported.
hands unreviewed names to the release radar, and creates, revises, and
retires the rows it owns. It never creates papers. A managed row whose entry
leaves the upstream board is deleted, or loses only this board's metric when
it carries another. A row with reviewer notes, or on a board that trims old
models without restating them (``retire_missing=False``), is kept and reported.

A managed methodology is the sync's head followed by any reviewer notes. The
engine rewrites the head on every run and keeps the notes; adopting a
Expand Down Expand Up @@ -79,6 +81,7 @@ class LiveLeaderboard:
model_name_suffix: str = ""
excluded: dict[str, str] = field(default_factory=dict)
adopt_unmanaged: bool = True
retire_missing: bool = True

@property
def managed_prefix(self) -> str:
Expand All @@ -94,6 +97,13 @@ def managed_head(self) -> re.Pattern[str]:
re.DOTALL,
)

@property
def managed_label(self) -> re.Pattern[str]:
"""Match a managed methodology, capturing the upstream entry label."""
return re.compile(
f'{re.escape(self.managed_prefix)} Official leaderboard entry "(?P<label>.*?)": '
)


@dataclass
class LiveSyncStats:
Expand All @@ -107,6 +117,7 @@ class LiveSyncStats:
unreviewed: list[str] = field(default_factory=list)
missing_papers: list[str] = field(default_factory=list)
missing_upstream: list[str] = field(default_factory=list)
deleted: list[str] = field(default_factory=list)

def to_dict(self) -> dict[str, Any]:
return self.__dict__.copy()
Expand Down Expand Up @@ -191,7 +202,7 @@ def check_entry_count(entries: list, what: str, low: int, high: int) -> None:


class LiveLeaderboardSyncService:
"""Create and revise one board's managed rows; never create papers."""
"""Create, revise, and retire one board's managed rows; never create papers."""

def __init__(self, db: Session, board: LiveLeaderboard):
self.db = db
Expand Down Expand Up @@ -220,6 +231,7 @@ def sync(
) -> LiveSyncStats:
board = self.board
fetched = len(entries)
upstream_labels = {e.label for e in entries}
entries = [e for e in entries if e.name not in board.excluded]
reviewed = [e for e in entries if e.name in board.identities]
reviewed_models = {
Expand Down Expand Up @@ -389,16 +401,44 @@ def sync(
published.add(id(row))
stats.matched += 1

stats.missing_upstream = sorted(
f"{row.model_name} ({row.harness})" if row.harness else row.model_name
for row in rows
if id(row) not in published
and (row.methodology or "").startswith(board.managed_prefix)
)
reranked = {board.metric}
for row in rows:
label = board.managed_label.match(row.methodology or "")
if (
id(row) in published
or label is None
or label["label"] in upstream_labels
):
continue
name = (
f"{row.model_name} ({row.harness})"
if row.harness
else row.model_name
)
if not board.retire_missing or self._managed_notes(row):
stats.missing_upstream.append(name)
continue
remaining = {
metric: value
for metric, value in row.metrics.items()
if metric != board.metric
}
if remaining:
row.metrics = remaining
if row.best_metric == board.metric:
row.best_metric = next(iter(remaining))
reranked.add(row.best_metric)
row.updated_at = now
Comment thread
NielsRogge marked this conversation as resolved.
Resolved
else:
self.db.delete(row)
stats.deleted.append(name)
stats.missing_upstream.sort()
stats.deleted.sort()
self.db.flush()
EvaluationService(self.db).recalculate_ranks(
task.id, dataset.id, metric_name=board.metric, commit=False
)
for metric in sorted(reranked):
EvaluationService(self.db).recalculate_ranks(
task.id, dataset.id, metric_name=metric, commit=False
)
if commit:
self.db.commit()
else:
Expand Down
70 changes: 70 additions & 0 deletions backend/tests/evaluation/test_carbon_board_syncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,76 @@ def test_sync_skips_excluded_names_and_reports_rows_that_leave_upstream():
assert len(rows) == 2


def test_sync_deletes_unannotated_rows_that_leave_upstream():
session = _session()
LiveLeaderboardSyncService(session, _board()).sync(
[_entry("Opus 5.5 (xhigh)", 3.61), _entry("Sol 5.6 (xhigh)", 4.7)]
)
annotated = _rows(session)["Claude Opus 5.5 (mini-SWE-agent)"]
annotated.methodology += " Reviewer checked the run logs."
session.commit()

stats = LiveLeaderboardSyncService(session, _board()).sync(
[_entry("Sol 5.6 (high)", 3.1), _entry("Opus 5.5 (xhigh)", 3.7, "Codex")]
)

assert stats.deleted == []
assert stats.missing_upstream == ["Claude Opus 5.5 (mini-SWE-agent)"]
assert "Claude Opus 5.5 (mini-SWE-agent)" in _rows(session)

gone = LiveLeaderboardSyncService(session, _board(min_selected=1)).sync(
[_entry("Sol 5.6 (high)", 3.1)]
)
assert gone.deleted == ["Claude Opus 5.5 (Codex)"]
assert gone.missing_upstream == ["Claude Opus 5.5 (mini-SWE-agent)"]
assert set(_rows(session)) == {
"Claude Opus 5.5 (mini-SWE-agent)",
"GPT-5.6 Sol (mini-SWE-agent)",
}


def test_boards_that_trim_old_models_report_instead_of_deleting():
session = _session()
LiveLeaderboardSyncService(session, _board()).sync(
[_entry("Opus 5.5 (xhigh)", 3.61), _entry("Sol 5.6 (xhigh)", 4.7)]
)
stats = LiveLeaderboardSyncService(
session, _board(min_selected=1, retire_missing=False)
).sync([_entry("Sol 5.6 (high)", 3.1)])
assert stats.deleted == []
assert stats.missing_upstream == ["Claude Opus 5.5 (mini-SWE-agent)"]
assert "Claude Opus 5.5 (mini-SWE-agent)" in _rows(session)


def test_aa_boards_keep_models_they_stop_listing():
assert {
job for job, sync in boards.BOARD_SYNCS.items() if not sync.board.retire_missing
} == {"sync_critpt", "sync_critpt_v2", "sync_terminal_bench_science"}


def test_rows_carrying_another_boards_metric_only_lose_this_metric():
session = _session()
LiveLeaderboardSyncService(session, _board()).sync(
[_entry("Opus 5.5 (xhigh)", 5.0), _entry("Sol 5.6 (xhigh)", 4.7)]
)
sol = _rows(session)["GPT-5.6 Sol (mini-SWE-agent)"]
sol.metrics = {**sol.metrics, "Other": 1.0}
session.commit()
assert sol.best_rank == 2

stats = LiveLeaderboardSyncService(session, _board()).sync(
[_entry("Opus 5.5 (xhigh)", 5.0), _entry("Sol 5.6 (high)", 3.1, "Codex")]
)

assert stats.deleted == ["GPT-5.6 Sol (mini-SWE-agent)"]
sol = _rows(session)["GPT-5.6 Sol (mini-SWE-agent)"]
assert (sol.metrics, sol.best_metric, sol.best_rank) == (
{"Other": 1.0},
"Other",
1,
)


def test_sync_reports_unknown_models_to_the_release_radar():
session = _session()
stats = LiveLeaderboardSyncService(session, _board()).sync(
Expand Down
3 changes: 2 additions & 1 deletion backend/tests/evaluation/test_physics_iq_verified_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def test_unreviewed_models_and_missing_papers_are_reported_not_created():
assert len(_rows(session)) == 32


def test_managed_rows_dropped_upstream_are_reported_not_deleted():
def test_annotated_rows_dropped_upstream_are_reported_not_deleted():
session = _session()
_seed_production(session)
_sync(session, parse_physics_iq_leaderboard(README))
Expand All @@ -473,6 +473,7 @@ def test_managed_rows_dropped_upstream_are_reported_not_deleted():
stats = _sync(session, parse_physics_iq_leaderboard("\n".join(lines)))

assert stats.missing_upstream == ["Sora 2"]
assert stats.deleted == []
assert ("Sora 2", "i2v") in _rows(session)


Expand Down
7 changes: 4 additions & 3 deletions backend/tests/evaluation/test_surge_chartography_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,15 +347,16 @@ def test_new_labels_are_auto_matched_or_handed_to_the_radar():
assert session.query(ModelReleaseSignal).one().sightings == 2


def test_managed_rows_dropped_upstream_are_reported_not_deleted():
def test_managed_rows_dropped_upstream_are_deleted():
session = _session()
_seed_production(session)
entries = parse_surge_chartography(HTML)
_sync(session, entries)
remaining = [entry for entry in entries if entry.label != "Mistral Large 3"]
stats = _sync(session, remaining)
assert stats.missing_upstream == ["Mistral Large 3 (with tools)"]
assert "Mistral Large 3 (with tools)" in _rows(session)
assert stats.deleted == ["Mistral Large 3 (with tools)"]
assert stats.missing_upstream == []
assert "Mistral Large 3 (with tools)" not in _rows(session)


def test_dry_run_rolls_back_and_collapsed_selection_is_refused():
Expand Down
3 changes: 2 additions & 1 deletion backend/tests/evaluation/test_swe_marathon_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,13 +449,14 @@ def test_new_models_are_auto_matched_or_handed_to_the_radar():
assert signal.lead_url == SWE_MARATHON_URL


def test_managed_rows_dropped_upstream_are_reported_not_deleted():
def test_annotated_rows_dropped_upstream_are_reported_not_deleted():
session = _session()
_seed_production(session)
entries = parse_swe_marathon_bundle(BUNDLE)
_sync(session, entries)
stats = _sync(session, [e for e in entries if e.name != "GLM 5.2"])
assert stats.missing_upstream == ["GLM-5.2 (Claude Code)"]
assert stats.deleted == []
assert "GLM-5.2" in _rows(session)


Expand Down
3 changes: 2 additions & 1 deletion backend/tests/evaluation/test_vals_finance_agent_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,14 +365,15 @@ def test_dated_deepseek_checkpoint_attaches_to_its_release_paper():
assert row.metrics == {METRIC_NAME: 54.1}


def test_managed_rows_dropped_upstream_are_reported_not_deleted():
def test_annotated_rows_dropped_upstream_are_reported_not_deleted():
session = _session()
_seed_production(session)
entries = parse_vals_finance_agent(HTML)
_sync(session, entries)
remaining = [entry for entry in entries if entry.label != "Command A+"]
stats = _sync(session, remaining)
assert stats.missing_upstream == ["Command A+"]
assert stats.deleted == []
assert "Command A+" in _rows(session)


Expand Down
Loading
Loading