Conversation
…ection Move HF row paging (with 429/5xx retry), download, sha256, upload-if-absent, public readback verification, concurrency, manifest hashing, and failure formatting into scripts/media-mirror.ts and use it from both mirror scripts. The vgi-bench manifestHash is byte-for-byte reproducible with the shared hasher. mirror-mmmu-pro-media gains skip-existing, --force, --dry-run, and defaults to MMMU_PRO_DEFAULT_REVISION. makeMmmuProVisionDatasetLayer now pins that revision and selects a committed manifest via mmmuProMediaManifestFor(revision); the list is empty until the mirror is run against the mmmu-pro-mirror bucket and the JSON is committed. Document bucket provisioning and BENCH_MEDIA_* in scripts/README.md.
…ision Generated by mirror-mmmu-pro-media against the dedicated mmmu-pro-mirror R2 bucket (1730/1730 images uploaded and verified via public readback). The runtime registry now imports the committed manifest, and mmmu_pro_vision configs accept an optional datasetRevision that falls back to signed HF URLs when no manifest matches. Also strip a trailing /<bucket> from BENCH_MEDIA_S3_ENDPOINT, since the R2 dashboard displays the S3 API URL in that form.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
MMMU Pro's Hugging Face image URLs expire after one hour, while cached dataset pages last 24 hours or indefinitely when revision-pinned. Use the VGI-Bench mirror pattern (#37, #41, #42): publish the original media once to a dedicated
mmmu-pro-mirrorR2 bucket and resolve samples through a committed stable-URL manifest. This replaces the closed base64 approach in #86.The mirror has been run against the dedicated
mmmu-pro-mirrorbucket (public originhttps://mmmu-pro-mirror.openrouter.ai): 1,730/1,730 images, 1.39 GB, every object verified by public readback, and the resultingsrc/benchmarks/mmmu-pro-media-manifest.json(837 KiB) is committed and registered. Defaultmmmu_pro_visionruns now send mirror URLs instead of signed HF URLs.What changed?
scripts/media-mirror.tsnow holds everything both mirror scripts share: env parsing, HF/rowspaging with 429/5xx retry, download, SHA-256,uploadUnlessPresent(skip when the stored object size matches,--forceoverrides,--dry-runwrites nothing),verifyPublished(public GET, content type, SHA-256), bounded concurrency, andhashManifestEntries.mirror-vgi-bench-media.tsis refactored onto it with unchanged behavior; its committedmanifestHashreproduces byte-for-byte with the shared hasher.mirror-mmmu-pro-media.tsgains skip-existing,--force,--dry-run, and defaults--revisiontoMMMU_PRO_DEFAULT_REVISION. It keeps the stricter checks: 40-hex revision,x-revisionheader, revision-pinned cached-asset paths, non-empty bytes, exactly 1,730 rows, public readback of every object, and no manifest written on any failure.mmmu-pro-media-manifest.tsimports the committed JSON at build time, validates it withbuildMmmuProMediaManifest, and exposesmmmuProMediaManifestFor(revision).makeMmmuProVisionDatasetLayerpins the HF revision and, likemakeVgiBenchDatasetLayer, swaps in the mirror URL and stampsmedia_manifest_hash/dataset_revisionwhen a committed manifest matches.mmmu_pro_visionconfigs accept an optionaldatasetRevision(same as vgi-bench); any revision without a committed manifest falls back to signed HF URLs.readMediaMirrorEnvstrips a trailing/<bucket>fromBENCH_MEDIA_S3_ENDPOINT. The R2 dashboard displays the S3 API URL in that form, and pasting it verbatim made Bun'sS3Clientwrite to<bucket>/<key>inside the bucket (stat succeeded, public GET 404).scripts/README.mddocuments the per-benchmark bucket layout, Cloudflare provisioning steps,BENCH_MEDIA_*variables, and how to run both scripts.HF
/rowsignoresrevision=. Preparation checks the actualx-revisionheader, and runtime source-path checks prevent silently pairing a changed dataset row with the mirrored image from another revision.Why?
Same shape as vgi-bench so the two mirrors are maintained together, with a separate bucket per benchmark so licensing, takedowns, and write tokens stay isolated. MMMU Pro is a fixed 1,730-row set with one image each, so unlike vgi-bench there is no reason to tolerate unresolved assets.
How to test
Run
bun run format:check,bun run check,bun run typecheck,bun test, andbun run build. All passed at376b5d4, 1,468 tests. Lint has only pre-existing warnings.Manual checks:
bun run mirror-mmmu-pro-mediawith themmmu-pro-mirrorR2 token uploaded and public-readback-verified 1,730/1,730 objects for563f3e84bb3b90893083a1f039cfa13077f2302band wrote the committed manifest. Re-running it is a verification pass (all objects skip as size-matched).https://mmmu-pro-mirror.openrouter.ai/mmmu-pro/563f3e84.../, allsourcePaths under the pinned cached-asset prefix, onlyimage/pngandimage/jpeg, no signed-URL query params. Spot-checkHEADon four mirror URLs returned 200 with matching content type and length.MMMU_PRO_DEFAULT_REVISIONwith 1,730 entries on the mirror origin, and that an unknown revision yields no manifest.manifestHashrecomputed withhashManifestEntriesequals the committed value.Not yet done: a provider-fetch smoke run (a real
mmmu_pro_visionsample through a provider to confirm it fetches from the mirror origin).Benchmark impact
Source:
MMMU/MMMU_Pro,vision/test, revision563f3e84bb3b90893083a1f039cfa13077f2302b; declared Apache-2.0. Images are copied without resizing or re-encoding. Prompts, answers, and scoring stay unchanged. Default runs now pin that revision (previously HEAD), which also makes the HF row cache non-expiring. Mirrored runs fail explicitly on missing media or source drift.Reviewer focus
scripts/media-mirror.tsand its tests are the shared surface; the vgi diff should be pure extraction.src/benchmarks/mmmu-pro-media-manifest.jsonis generated output; review a few entries rather than the whole file.mmmu_pro_visionsample through a provider) has not been done yet; the mirror URLs are verified by direct public GET only.Checklist
Link to Devin session: https://openrouter.devinenterprise.com/sessions/3544413f10474e33b49c166fe6a5db24
Open in Devin Desktop: https://openrouter.devinenterprise.com/desktop/session/3544413f10474e33b49c166fe6a5db24?variant=devin
Requested by: @ayush-or