Repository navigation
[WIP] Adapter: olmocr-bench - #95
YiDanielLu wants to merge 2 commits into
Conversation
One Harbor task per page for all 1,403 olmOCR-Bench PDFs (7,019 unit tests). The agent gets the PDF and writes Markdown; grading runs the unmodified upstream olmocr test classes from a pinned commit, plus the auto-added baseline test, as benchmark.py does. olmocr-bench-aggregate recomputes the official score (mean of per-JSONL pass rates). Oracle: 1403/1403 tasks at reward 1.0. Parity not run yet.
a8bfb55 to
93db2aa
Compare
|
/review-adapter |
|
Structural validation of commit 93db2aa at 2026-11-17 01:27:04 UTC Adapter contract v1 ( ❌ Adapter Validation:
|
|
Quick heads-up: the automated run for If you consider this PR ready for review, please address those structural items before the next full review. If you know it’s still a work in progress or waiting on parity coordination, feel free to ignore this note for now and come back when ready. Thanks! |
|
On October 19, Harbor updated its new-task template to use a separate verifier by default. I noticed the tasks generated by this adapter still run the grader in the agent’s workspace. Could you switch them to a separate verifier and rerun the oracle on the latest stable Harbor release? Harbor #3712 If you find the full oracle run to be too costly time-wise or compute-wise, maybe you can start with rerunning one representative task? For that task, try the reference solution first, then with a submission you know is wrong. Once you are done, could you please share the task ID and both scores so we can check that the new verifier can grade submissions as expected? If you’ve already run parity or in the middle of running parity, could you keep the original submissions, agent logs, and grading results, preferably in your Hugging Face fork? If only the grading environment changes and those files contain everything the verifier needs, we may be able to regrade the saved submissions without running the agents again. |
Set [verifier] environment_mode = "separate" and declare /workspace/output.md as the only artifact. The grader (pinned olmocr + Playwright Chromium for KaTeX) and the page's tests move to tests/Dockerfile; the agent image only holds the PDF.
|
Thanks @audreina17! Switched to a separate verifier in 21a7c55:
On Harbor 0.26.0, task
Full oracle on 0.26.0: 1403/1403 at 1.0, 0 exceptions. Parity hasn't started yet. The plan is waiting for review by @XiangningLin, so there are no saved submissions to regrade. |
|
Closing this one. At Xiangning's request I'm focusing on SecureReviewer (#97), because olmOCR-Bench is already being adapted by another contributor in harbor-index/adapters#3. A few notes in case they help whoever picks it up:
The branch stays on my fork if any of it is useful. |
Adds an adapter for olmOCR-Bench (AllenAI, arXiv:2502.18443): 1,403 single-page PDFs with 7,019 machine-checkable unit tests covering text presence and absence, reading order, table cells and math.
The adapter makes one task per page and includes every page. The agent gets
/workspace/input.pdfand writes/workspace/output.md, using olmOCR's own transcription prompt. The verifier runs the page's upstream tests, plus the baseline test thatbenchmark.pyadds automatically, with the unmodifiedolmocrtest classes installed from a pinned commit (f7cfe4c2). The dataset is pinned to HF revision54a96a6f.rewardis the fraction of the page's tests that pass. The benchmark's headline number is the mean of per-test-file pass rates, souv run olmocr-bench-aggregate <job-dir>recomputes it from a Harbor job.Status
benchmark.pywould abort in that case too. The grader now relaunches the renderer and retries, for Playwright errors only. All 4 pages then scored 1.0.uv run olmocr-bench --split parityand documented in the README.python -m olmocr.bench.convert claude, run on the same subset and scored witholmocr.bench.benchmark.src/olmocr-bench/that sends the page to the model with the same prompt and settings asrun_claude.pyand writes the reply tooutput.md. Optionally alsoclaude-codewith the same model, to show the tasks work with a standard CLI agent.Oracle results
Full run (
jobs/oracle-full) on top, and the rerun of the 4 Chromium-crash pages after adding the grader retry (jobs/oracle-rerun4) below:Official metric (
olmocr-bench-aggregate, full run plus rerun): 100.0% overall, and 100% on every test file and every test type.