Skip to content

Benchmark runner - #2

Open
kwiscion wants to merge 126 commits into
mainfrom
benchmark-runner
Open

kwiscion wants to merge 126 commits into
mainfrom
benchmark-runner

Conversation

@kwiscion

@kwiscion kwiscion commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Note

Medium Risk
New public POST endpoints (runner submit, comments) accept user input and write to blob/local storage—abuse and data-integrity depend on rate limits and validation; runner cooldown is per-instance only.

Overview
Next.js site and benchmark runner. The static lab site moves into app/ with shared layout, live fetches from public/results/, and new surfaces: leaderboard (incl. PolNative), bench catalog + PR-based benchmark submissions, engineering log, experiments log, and community pages. POST /api/runner/submit queues HF model evals (open-pl-v1 on qwen3.5-9b) with validation, rate limits, and honeypot; lib/store.js persists runs/suites/submissions to Vercel Blob in prod or public/results locally (.env.example documents both blob vars).

Community APIs. /api/sota-comments and /api/v4-comments add moderated comment threads with the same blob-or-local .data/ fallback pattern.

Data / training policy (docs). Bielik is removed as a distillation teacher after open-judge fact errors; v3 mix lineage and plans are updated. V4 adds DATASET_MANIFEST.md, extended audits (V3_DATA_AUDIT.md), and README notes (INCLUDE-44 loader, pip install -e .). Competitor notes in BIELIK_RECIPE_NOTES.md and deploy hygiene (.gitignore, .vercelignore, Python 3.13 pin).

Reviewed by Cursor Bugbot for commit 3c13f7a. Bugbot is set up for automated code reviews on this repo. Configure here.

Kamil Dzieniszewski and others added 30 commits June 11, 2026 16:09
- 18 stron HTML przepisanych na app router (te same URL-e); live-fragmenty
  jako client components, nav/footer z site.js jako komponenty
- assets/results/data przeniesione do public/ (ścieżki fetch bez zmian);
  zaktualizowane ścieżki zapisu w bench/publish.sh i skryptach
- /bench-explorer: katalog benchmarków z filtrami (typ_zadania, kategoria,
  metryka, model, status, tagi) + eksport CSV
- /bench-explorer/nowy: formularz zgłoszenia z walidacją i prefilled PR
  (public/data/submissions/)
- schemat benchmarks.json rozszerzony: typ_zadania, status
  (draft/verified/deprecated), dodal, data_dodania, uwagi_review, repo
- analityka przez @vercel/analytics + @vercel/speed-insights;
  usunięte: *.html, assets/site.js, vercel.json

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds proper dependency management via uv. Previously the only
dependency documentation was a one-liner in README.md with unpinned
packages.

- pyproject.toml declares the three runtime deps (datasets, huggingface-hub,
  sacrebleu) with minimum versions resolved by uv
- uv.lock locks all 48 transitive deps for reproducible installs
- .python-version pins the dev environment to Python 3.13

To install: `uv sync`
To run scripts: `uv run python bench/bench_mcq.py <bench> [N] [seed]`
Dataset CohereForAI/include-base-44 używa indeksowania 0-based (wartości
0-3), nie 1-based jak zakładał komentarz w kodzie. Skutki błędu:
- answer=0 → gold=-1, item pomijany (149/548 wierszy, ~27% danych)
- answer=1/2/3 → gold przesunięty o 1 w dół (każdy wynik trafiał w złą opcję)

Oba efekty łącznie zepchnęły accuracy poniżej losowego (~25%), co
wykluczyło INCLUDE-44 z leaderboardu.

Poprawka: int(a) zamiast int(a) - 1 w gałęzi obsługującej liczby całkowite.

Przy okazji: OUT odczytywany z BENCH_OUT (fallback: ~/bench_results),
żeby skrypt działał bez modyfikacji poza maszyną kacpra.

Zweryfikowano lokalnie: 0/548 wierszy poza zakresem po poprawce,
pilotaż n=50 seed=42 → Bielik 70%, Qwen 64% (wcześniej: poniżej 25%).
Usunięto wykluczenie INCLUDE-44 z make_dashboard.py — było
tymczasowe, dodane gdy loader zwracał wyniki poniżej losowego.
Gold mapping naprawiony w poprzednim commicie.
…pping

fix(include): popraw mapowanie gold w loaderze INCLUDE-44
…eacher)

- V3_DATA_AUDIT.md: pełny audyt kodu, artefaktów i warstwy CPT (3 błędy krytyczne przed treningiem)
- bielik_distill usunięty z miksu: sędzia dał fakty=powazne w 50.6% surowych odpowiedzi, 78% warstwy to faktograficzne QA; korpus 10k zostaje wyłącznie jako benchmark wiedzy Bielika
- train_v3.jsonl przebudowany: 1742 ex (distill 58.7 / human_pl 17.5 / en 23.9)
- DATA_LINEAGE + V3_DATA_PLAN: Bielik jako teacher = DROPPED (ta sama logika co PLLuM)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…istill, exclusion list)

CRITICAL:
- decon_audit: pełny LLMzSzŁ test z HF, probe_v1, egzekucja exclusion list sondy
  (sha1 text -> probe_excluded), globy external/+knowledge/, historia audytów,
  skan niesparsowalnych linii; pierwsze uruchomienie zdjęło 118 doków sondy
  z entigraph_pl_focus.clean
- cap 200 znaków atomów usunięty z 6 konsumentów (pełne 17.7k atomów)
- warstwa distill po otwartym sędzi: 1139/1249 ok (10% powazne odrzucone)
- bramka decon OBOWIĄZKOWA w build_v3_mix (exit!=0 blokuje trening)

MAJOR/MINOR:
- build_v3_mix: udziały PO filtrach, twardy błąd na braku warstwy, styl jako
  osobna warstwa, dash_overuse (>=2 myślniki) zamiast rate-only
- make_style_disjoint.py: reprodukcja disjoint zweryfikowana 1:1, zaostrzona
  (prompt+odpowiedź vs cały holdout, slim rekordy) -> 502
- make_test_atoms: bez zapisu częściowego pliku przy nieudanym pobraniu
- reservoir Tulu3 naprawiony; zapis atomowy gen_distill; allowlist provenance
  (blokada Anthropic/OpenAI); liczniki strat + resume per akapit/ścieżkę
  w EntiGraph; fallback kluczy; daily.yaml zsynchronizowany z realnymi ścieżkami
- NER przegenerowany (format 'Nazwa: kategoria', sędzia --grounded): 67 vs 44

Finalny miks: train_v3.jsonl = 1771 ex (63.2/21.1/10.5/5.2), bramka: CZYSTY

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… miks pod MT-Bench-PL

- spotcheck_entigraph.py: pomiar wierności korpusów CPT vs źródła; flash 20.5/74.5%
  niewiernych, pro GORSZY (33.5/36.5%) -> wina metody; sędzia skalibrowany
  (kontrola 50/50, retest 1/100); ocena wsadowa rozmywa rygor -> filtr per dok
- entigraph_augment.py: utwardzone prompty groundingu + FAITH_FILTER=1 (filtr
  per dok 122b); walidacja NIEZALEŻNYM sędzią (pro): 1.0% niewiernych po filtrze
- verify_probe_golds.py: golds sondy 70/71 ok (1.4%) — eval CPT wiarygodny
- human PL osądzone: aya 535/1108, oasst 54/96; miks bierze tylko verified
- distill +4 zdolności generatywne (writing/reasoning/summarize/rewrite) pod
  MT-Bench-PL, sędzia --grounded; near-dup: 1 para/1139
- mtbench_pl.py: runner MT-Bench-PL (bramka wewnętrzna, otwarty sędzia, --compare)
- miks finalny: 2233 ex (65.1/21.7/7.8/5.4), bramka decon: CZYSTY
- korpus zpe: kwarantanna (README w slayer-data/knowledge/)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…v3 + komplet wyników na 9 benchmarkach + porównanie z Qwen3.6-27B

Źródła: EU Public Summary (AI Act) + raport techniczny arXiv:2601.11579.
Podpięte do nav jako "dane bielika".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rki (wyniki + Qwen3.6)

Dane treningowe i benchmarki na osobnych podstronach, wzajemnie połączone.
Obie w nav.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…eld-out gate

- matrix.json: każda sekcja oznaczona official_for; caveat temp poprawiony (real-world defaults, nie handicap)
- heldout_check.py: odwrotny kierunek decon (indeks=trening, kandydat=held-out), reużywa silnika decon_audit
- HELDOUT.md: spec prywatnego held-outu (slayer-data/heldout gitignored)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ych stron z main

main wyprzedził branch o 5 commitów (m.in. /bielik-dane, /bielik-benchmarki,
nowi członkowie zespołu, official_for w matrix.json). Scalenie:

- Konflikty rename: results/*.json → public/results/, assets/team/*.jpg →
  public/assets/team/ (decon_train_v3, entigraph_faithfulness,
  probe_golds_verification, bartlomiej-boczylo.jpg, kuba6.jpg)
- assets/site.js + team.html (usunięte w migracji) — zmiany z main przeniesione
  do komponentów: linki bielik-dane/bielik-benchmarki w Nav, nowi członkowie
  (Bartłomiej Boczyło, Kuba) w app/team/page.jsx
- Migracja 2 nowych stron HTML→Next: app/bielik-dane, app/bielik-benchmarki
  (1:1, te same URL-e, statyczne); usunięte orphan bielik-*.html
- matrix.json / train_v3_mix_report.json: zmiany z main zachowane na public/

next build czysty — 26 tras, wszystko prerendered (SSG).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Migracja na Next.js (App Router) + bench-explorer: katalog, zgłoszenia, CSV
Chaos: 16 linków w jednym rzędzie, zduplikowane etykiety ("benchmarki"
/bench-explorer vs "benchmarki bielika"), 5 tras w ogóle poza navem
(/benchmarks, /closed-benchmarks, /roadmap, /drabina, /zespol), a na
mobile WSZYSTKIE linki ukryte (tylko CTA).

- Grupowanie w 5 dropdownów: protokół · dane & trening · benchmarki ·
  bielik · zespół (wszystkie 23 trasy osiągalne, bez duplikatów)
- Stan active podświetla grupę zawierającą bieżącą trasę
- Dropdown desktop: hover/focus-within, bridge ::before (brak martwej luki)
- Mobile: hamburger + rozwijane menu z nagłówkami grup (zamiast ukrywania
  wszystkiego) — naprawia brak nawigacji mobilnej

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…arki→„benchmarki"

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diagnoza po bramce KLEJ v3 (makro base 77.36 vs v3 77.27; cdsc_e 75->57):
sonda odpowiedzi pokazała poprawny słownik (parser OK), a rozkład etykiet
w treningowym nli był 37/34/36 (uniform) vs naturalny prior NLI (większość
par neutralna) -> przesunięta granica decyzji. Fix: nli z ostrymi definicjami
(wynikanie tylko z konieczności, sprzeczność tylko gdy niewspółprawdziwe,
inaczej neutralna), rozkład 54/37/9, etykieta + uzasadnienie; top-up summarize.
Miks v3b: 2251 ex, bramka decon CZYSTY. Retrening v3b + auto-gate na H100 (tmux).
v3 run-1: LLMzSzŁ 66.8 vs base 63.5 (+3.3); KLEJ: polemo +9.0/+7.5, belebele plask (kontrola OK).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rotezy, typografia zakresów

Deep pass (wieloagentowy audyt 23 stron + korekta każdego diffu):
- Myślniki/strzałki-protezy (—, →) jako uniwersalny łącznik → przecinek/
  dwukropek/średnik tam, gdzie czyta się naturalniej (poprawna pauza zostaje)
- Zakresy liczbowe: dywiz → półpauza (30–40%, 11–14B, 1–2, $5–6k itd.)
- Kilka realnie niezgrabnych zdań przepisanych (np. "dochodzą z" → "pochodzą z",
  guardrail "... → wycięte" → "model wycina: ...", uzupełnione elipsy)
- Zachowany gęsty, lab-owy ton; terminy, liczby, linki, JSX i encje nietknięte

13 stron, ~35 linii. next build czysty (26 tras SSG).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…le kamieni)

- public/results/cpt_progress_history.json: oś czasu snapshotów
- bench/cpt_progress_snapshot.py: dopisywanie snapshotu po aktualizacji licznika (idempotentny per dzień)
- /progress: % na duże, tempo/dzień, ETA do 2B przy obecnym tempie

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…recepturze Munina 1.0

- /eng-log: listing + strony postów (markdown-lite, zero zależności, SSG)
- wpis: Munin 1.0 to SFT na Qwen3.5-9B-Base, nie CPT — receptura rozkodowana
  z nazwy katalogu runu w prime_rl_finalized.json; lekcje dla Slayera (LR,
  en-regression, brak checku long-context)
- nav: eng log (notatki) w grupie dane & trening

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…on, decon_audit.json)

app/progress/cpt.jsx był tylko lokalnie — czysty checkout Vercela nie budował się
(Module not found './cpt'); przez to nie wdrożyły się też dwa poprzednie commity.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread app/runner/[id]/page.jsx
<span className="guard fail">EN regresja: SPADEK</span>
) : (
<span className="guard ok">EN regresja: OK</span>
)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run page ignores guard math

High Severity

The run report’s EN regression strip uses each guard’s stored status, while the benchmark runner board derives pass/fail via guardStatus from scores vs the base run. When JSON status is stale or wrong, the drill-down can show “EN regresja: OK” while the board shows a failed guard for the same run.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7084bcc. Configure here.

Comment thread lib/runs.js Outdated
if (g.gen == null || !b || b.gen == null) continue;
if (g.gen < b.gen - eps) return "fail";
}
return "ok";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing base shows guard OK

Medium Severity

When a run lists EN guards and a base id but that base run file is missing, guardStatus returns "ok" instead of "na" or "fail". The board can show a green guard light even though no regression check against the anchor was possible.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7084bcc. Configure here.

Comment thread app/home-live.jsx
export function BenchCount() {
const d = useLeaderboard();
const n = d ? (d.benchmarks || []).length : 10;
return <div className="v">{n}</div>;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BenchCount defaults to ten

Low Severity

BenchCount renders 10 while leaderboard JSON is still loading. If the live file has a different benchmark count, the homepage briefly shows a wrong number instead of a loading state like MeasureNote in the same file.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7084bcc. Configure here.

async function readComments() {
const blobComments = await readBlob();
if (blobComments) return blobComments;
return readLocal();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blob read skips local fallback

Medium Severity

With BLOB_READ_WRITE_TOKEN set, readBlob returns an empty array when no blob exists or fetch fails. readComments treats that as success and never falls back to the local .data file, so GET can return zero comments even when local storage has data.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7084bcc. Configure here.

kwiscion and others added 12 commits June 20, 2026 11:37
Addresses all 16 findings: allowOverwrite, deterministic-URL reads (no
list-per-read), dynamicParams + generateMetadata, suite publishing,
submission/v1 in a queue prefix with cooldown/size-cap/dedup, env-restore
in tests, pure path helpers, real-seed validation test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…body cap, id collisions)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…rwrite)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kwiscion and others added 4 commits June 20, 2026 19:15
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Vendor Open PL Leaderboard tasks (B1); per-task protocol map, null!=broken
(B2); flock single-worker + re-read claim (B3); submit-route base/suite
validation + immutable approved prefix (B4); drop eval-time decon, optional
decon_ref provenance only (M1/M2); realistic 14B cap + vLLM params + OOM-as-
failed (M3); subprocess env/exit handling (M4); real captured lm-eval fixture
before the transform (M5); version-gated re-baseline vs in-place overwrite (M6).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…coupled tasks)

Second-pass review fixes: prefix-based submission lifecycle + queue-approve CLI
+ delBlob/moveSubmission close the approval TOCTOU (B1/B2); static base/suite
allowlist on the public route, no live Blob list (B3); limited-sample guard
tripwires (B4); GPU-free tasks reordered first (B5); documented submission/v1
lifecycle (B6); atomic batched re-baseline (B7).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 5 total unresolved issues (including 4 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9cedb17. Configure here.

};

const comments = [comment, ...(await readComments())].slice(0, MAX_COMMENTS);
await writeComments(comments);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concurrent POSTs lose comments

Medium Severity

Comment creation reads the full list, prepends one entry, and writes the JSON back with no locking or merge. Two overlapping POST handlers can both read the same snapshot; whichever put/writeFile runs last wins, so the other new comment never appears in the stored file.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 9cedb17. Configure here.

kwiscion and others added 9 commits June 22, 2026 20:17
…runbook

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…le, queue CLIs

Add fs-fallback write path to putJson (mkdir -p + writeFile under FS_ROOT when
!usingBlob()), delBlob helper, and prefix-based submission lifecycle helpers
(listSubmissions, getSubmission, moveSubmission with put-before-delete safety).

Add stagePath to blob-paths.js for the 5 lifecycle stages.

Create 4 queue CLI scripts (queue-list, queue-approve, queue-claim, queue-resolve)
that call the store helpers directly and work in both blob and local fs modes.

Add --local flag to publish-run.mjs to skip the blob token guard.

Tests: 29/29 pass (17 Phase 2 + 12 new covering fs writes, delBlob, full
stage flow, publish-run --local, stagePath).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ovisional YAML

Add bench/runner/suite_cfg.py with load_suite_cfg() and validate_suite_cfg(),
plus the provisional suite_open_pl_v1.yaml (task names pending GPU dry-run).
24 pytest cases cover happy paths, all validation rules, and the shipped YAML.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add bench/runner/lm_eval_to_run.py with to_run_v1() that maps lm-eval
results + suite config + metadata into a run/v1 dict.  Implements the
4-state per-task logic (ok/broken with partial-unresolved handling),
robust metric resolution for both simple and multi-segment filter keys,
aggregate computation (excludes broken/null), and limited-sample guards.

Tests: 21 cases covering all 5 mandated scenarios (ok+both, ok+gen-only,
ok+mcq-only, fully-broken, partial), aggregates, guards with
flexible-extract metric key form, mmlu group aggregate, demo flag,
broken guard edge case, and validateRun schema compliance.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add bench/runner/run_one.py (run_one, _invoke_lm_eval, CLI) with
RunnerOOM/RunnerBadRun/RunnerConfigError exceptions and publish
exit-code mapping. 14 unit tests monkeypatch the GPU eval and Node
publish subprocess; all 59 runner tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… allowlists

Validate base/suite against ALLOWED_BASE and ALLOWED_SUITE; reject 400 on
mismatch. No live Blob list on the public path (B3). Defaults preserved.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tick() polls approved queue, claims one item, runs eval via run_one,
resolves done/failed. RunnerConfigError intentionally skips resolve to
preserve the queue item. All subprocess/GPU seams monkeypatched in tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1. Worker orphan bug: catch base RunnerError (not just OOM/BadRun) so
   a generic lm-eval failure resolves the item as "failed" instead of
   leaving it stuck in running/. RunnerConfigError still skips resolve.

2. vLLM tuning: _invoke_lm_eval now folds suite_cfg["vllm"] dict into
   --model_args when backend=="vllm" (e.g. gpu_memory_utilization,
   max_model_len). Non-vllm backends unchanged.

3. Injection seam: replace f-string JS interpolation in _get_submission
   with argv-based scripts/queue-get.mjs CLI (mirrors queue-list/claim/
   resolve pattern). Eliminates shell-injection vector.

4. Wire validator: run_one() calls validate_suite_cfg() after load;
   raises RunnerConfigError on structural errors instead of letting
   a raw KeyError propagate.

6 new tests (74 total runner tests).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants