You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ImageReference: make image laziness a declared contract #395
cc @jason718 — follow-up from the multimodal eval stack (#278), requested on #324.
LMRequest.images accepts several shapes — a PIL image, a path, a zero-arg callable, or a callable returning a list — and olmo_eval.common.images.resolve_images normalizes them in the provider. It works, and it keeps pixels out of the parent process, but the contract is conventional rather than typed: a task can attach an unpicklable closure and only fail once the multiprocessing queue tries to pickle it.
Proposal: a small ImageReference ABC (PathImage, HfDatasetImage, ImageList, ...) with a resolve() method, so the accepted shapes are enumerable and picklability is structural. Note the related hazard for whoever picks this up: runners/io/builders.py spreads instance.metadata into the predictions doc and writers.pyjson.dumps it with no fallback, so the benchmarks that store lazy loaders in metadata crash the predictions/requests writers (Object of type partial is not JSON serializable) — --no-save-requests sidesteps it today. A typed reference with a JSON form would fix both.
#324 fixes the concrete writer hazard described above, and it is worse on current main than this issue says: the runner no longer crashes. write_requests_jsonl raises on the first record, the error is swallowed, and the run reports Success with an emptyrequests.jsonl. Reproduced with olmo-eval run -m mock -t muir_bench -o limit=3 (0 lines written; 3 with the fix).
The fix (fa84df7 on #324) gives both JSONL writers a json.dumps fallback that writes non-JSON values as a type placeholder ("images": "<partial>"). That is enough to stop losing records, but it is not the ImageReference design, so this stays open for the typed reference with a real JSON form.
Activity
Address review: per-instance multi-image metrics, ValueError over assert
Address review: per-instance multi-image metrics, ValueError over assert
Address review: per-instance multi-image metrics, ValueError over assert
Address review: per-instance multi-image metrics, ValueError over assert
Address review: per-instance multi-image metrics, ValueError over assert
Address review: per-instance multi-image metrics, ValueError over assert
jason718 commentedon Sep 24, 2026
#324 fixes the concrete writer hazard described above, and it is worse on current
mainthan this issue says: the runner no longer crashes.write_requests_jsonlraises on the first record, the error is swallowed, and the run reports Success with an emptyrequests.jsonl. Reproduced witholmo-eval run -m mock -t muir_bench -o limit=3(0 lines written; 3 with the fix).The fix (fa84df7 on #324) gives both JSONL writers a
json.dumpsfallback that writes non-JSON values as a type placeholder ("images": "<partial>"). That is enough to stop losing records, but it is not theImageReferencedesign, so this stays open for the typed reference with a real JSON form.Address review: per-instance multi-image metrics, ValueError over assert
Address review: per-instance multi-image metrics, ValueError over assert