Repository navigation
Pointing + counting benchmarks (3/5) - #322
Conversation
143a62a to
7beea67
Compare
undfined
left a comment
There was a problem hiding this comment.
I found four issues in this layer. The first two affect persisted result correctness and task identity, so I think they should be fixed before merge. The other two affect pretrain prompt fidelity and the documented scoring failure behavior.
70a2143 to
bb82cfe
Compare
471f02b to
675f516
Compare
675f516 to
fc0a60c
Compare
gregorybchris
left a comment
There was a problem hiding this comment.
This review was generated by an agent following
REVIEW_GUIDE.md. It is not from a human reviewer. Reply in the PR thread and a maintainer will follow up.
Nice work on the parity here; the prompt-family handling and the _mp seeding look right, and I verified Tyler's four findings are addressed: PointingMetric and PresenceMetric have their own compute_instance with fallback disabled (weighted metrics store None), both prompt fields are in the hash, pixmo_count branches on prompt_templates, and the pointing scorer implements the documented zero-score contract with a test. Ruff, ty, and the unit suite (2260 passed) pass locally.
Two things to address before merge.
Blocking
-
src/olmo_eval/evals/vision/scoring/pointing.py:119
PointingScorer.scorecatches every exception and returns a zero-valued result. That satisfies the documented contract for a malformed RLE, but it also catchesImportErrorwhenpycocotoolsorscipyis missing, and any programming error in_score. A worker without those packages therefore scores all 4,994 SACoGold instances asf1=0.0and the run reports Success, which is the failure mode the PR description itself calls out. Please narrow the catch to data errors from decoding and matching (ValueError,KeyError,TypeError,IndexError), letImportErrorand everything else propagate so the runner records a structured scoring error, and check the imports once at task initialization so a missing dependency fails before inference starts. It would also help to surface the per-exampleerrorfield as an aggregate, for example ann_scoring_errorsmetric like CharXiv'sn_invalid, so a partial failure is visible inmetrics.json. -
src/olmo_eval/evals/vision/tasks/single_image.py:33
ChartQaSubsetMetric(andMeanScorerMetricon line 19) are defined here with no consumer; they are first used in #323.ChartQaSubsetMetricalso inherits the defaultcompute_instance, so the_humanand_augmetrics persist the overall scorer value for every instance, including instances outside their subset. I reproduced it in the #323 branch: anis_human=Falseinstance underrelaxed_correctness_humanstores1.0. This is the same class of bug Tyler flagged on the pointing and dense-caption metrics. Please give it acompute_instancethat returnsNoneoutside the subset and disable scorer fallback, with the same poison-the-scorer-channel regression test the other metric families have. Since the class has no caller here, it may be cleaner to move it andMeanScorerMetricto #323 with the tasks that use them.
Non-blocking
-
src/olmo_eval/evals/vision/tasks/pointing.py:50
The comment "a missing scorer dependency scores every instance zero rather than failing the run" describes the behavior item 1 asks to change; please update it together. -
src/olmo_eval/evals/vision/scoring/vqa.py:17andscoring/pointing.py:99
_response_textis duplicated here and a third copy arrives in #324. One helper inscoring/__init__.pyor a smallscoring/common.pywould do. -
pyproject.toml:60
scipy~=1.17.1is a tight pin inside thehfextra whilepycocotoolsis unpinned. If the pin is deliberate (a known scipy break), a comment would help; otherwise a>=lower bound is friendlier to other extras. -
src/olmo_eval/evals/vision/tasks/single_image.py:144
Ai2dMetricis also forward plumbing for #323. Same suggestion as item 2: land it with its consumer, or say so in the description.
Nits
- Nit:
sa_co_gold.pybuilds_METRICSand_POINT_METRICSwith the samepointing_metrics(...)call; the first could be reused. - Nit:
scoring/pointing.pyopens the image to read its size whenimage_sizeis missing from metadata; all three tasks populate it, so a hardKeyErrorwith a clear message might be preferable to per-instance file I/O inside scoring.
Before merge
Items 1 and 2, plus the rebase noted on #316. Then merge once CI is green.
1a14da2 to
6883668
Compare
1fec6c9 to
9275ba1
Compare
21466dc to
aa9062f
Compare
aa9062f to
6582f48
Compare
Third of five PRs splitting #278. Lands the pointing family (7 tasks: the question-form pixmo_points_eval / sa_co_gold_subset and the model-prompt `_mp` variants including the sampled and unsampled gold point sets) and the two counting benchmarks that share its prompt-family machinery. `PointingTask` and `ImageQATask` now subclass `VisionTask`, dropping the byte-identical instance-caching and request-construction each carried. Point-in-mask scoring (COCO-RLE decode + maximum bipartite matching, mirroring mm_olmo's SegmentationPointingScorer) lives in `vision/scoring/pointing`; the count parse ladder and the counting scorer in `count_parsing`/`vqa`, where the image-QA scorers will join them. pycocotools and scipy join the `hf` extra: the pointing scorer needs them, and a missing scorer dependency scores every instance zero rather than failing. Verified against the mm_olmo-validated runs on #278: instance counts exact for all seven datasets (1215 / 4994 / 3856 / 28672 / 166766 / 490 / 540) and first-example prompts byte-identical, including the seeded `_mp` templates. Co-authored-by: Ziqi Gao (Roy) <[email protected]>
…ng errors - PointingScorer catches only malformed-ground-truth errors (ValueError, KeyError, TypeError, IndexError) and scores those examples zero with the error recorded; a missing pycocotools/scipy or a bug in the scorer now propagates so the runner records a scoring error instead of reporting 4,994 zeros as Success. PointingTask probes both backends while building instances, so such an environment fails before a model is loaded. - pointing_metrics reports n_scoring_errors, making a partially unscorable run visible in metrics.json rather than only in the logs. - A missing image_size is validated before scoring and raises: every pointing task records it, so its absence is a task bug, not bad data (this also drops per-instance file I/O from the scoring path). - One response_text helper replaces the copies in the pointing and VQA scorers. The pointing parser's strip() stays at its call site, since the VQA parsers do their own normalization and must see the text unchanged. - MeanScorerMetric, ChartQaSubsetMetric and Ai2dMetric move to the image-QA PR with the tasks that use them; nothing here consumed them. - scipy's pin is annotated as matching the analysis extra.
7acd4f8 to
1c577f2
Compare
|
Both blocking items and the non-blocking ones are addressed; rebased onto 1 (blocking) — 2 (blocking) — took the cleaner option you offered: 3 — comment updated with the behavior change. 4 — one Nits: Full suite 2,663 passed; lint/format/ |
gregorybchris
left a comment
There was a problem hiding this comment.
This review was generated by an agent following
REVIEW_GUIDE.md. It is not from a human reviewer. Reply in the PR thread and a maintainer will follow up.
Approving — both blocking items are properly fixed, and the extras you added on top are the right ones. Three small things below, none of them worth holding the merge for.
I re-verified each item rather than taking the summary on trust:
- Scoring failures are honest now.
PointingScorer.scorecatches onlyValueError/KeyError/TypeError/IndexError, so a missingpycocotools/scipyor a scorer bug reaches the runner. Therequire_scoring_dependencies()probe inPointingTask.instancesis better than what I asked for — the environment fails before a model loads, not at the first scored example. Andn_scoring_errorsmakes a partially unscorable run visible inmetrics.json.PointingErrorCountMetricgetscompute_instanceas a 0/1 flag withpairwise_display_format() -> "raw", which is the right shape for a count. - Metrics moved rather than forward-plumbed.
MeanScorerMetric,ChartQaSubsetMetricandAi2dMetricland in #323 with their consumers. Every metric class remaining here hascompute_instanceplus a deliberatesupports_pairwise_scorer_fallback. - Items 3, 4, 5, 6 and both nits check out. Good catch that the three
_response_textcopies were not identical — preserving the non-stripping semantics and stripping at the pointing call site is the right call, and worth having written down. - No hash churn.
arc_easy,gsm8k,hellaswag,humaneval,dropanddense_captionhash identically tomainate1e16885, and the three new pointing tasks hash the same across two consecutive processes.
Locally: 2500 passed, 30 skipped; ruff, format and ty clean (the one ty diagnostic is the pre-existing harness/sandbox/executor.py suppression, untouched here and not in CI's resolution). CI is green.
Non-blocking
-
src/olmo_eval/evals/vision/scoring/pointing.py:111
The private_response_textis now dead — line 19 imports the sharedresponse_textand line 182 is the only call site. Ruff doesn't flag unused module-level functions, so nothing caught it. Please delete it so the next reader doesn't wonder which one to use. -
src/olmo_eval/evals/vision/tasks/pointing.py:131andtasks/single_image.py:18
_pointing_resultsand_point_count_resultsflatten every output, so anum_samples > 1run averages the samples instead of applyingTaskConfig.output_score_aggregation(default MAX);_pointing_result/_point_count_resulttake the first output for the per-instance value. I reproduced the equivalent on the CharXiv metric in #323: two instances sampled twice with scores[0, 1]and[1, 0]give0.5where MAX gives1.0. No task here setsnum_samples > 1, so this only bites on-o sampling_params.num_samples=N.dense_captionsolved it by rejecting the configuration outright — could the pointing and count families do the same, or apply the configured aggregation before averaging?
Nits
- Nit:
src/olmo_eval/evals/suites/molmo2.py:3— "Grows with the vision families as they land: captioning now, pointing/counting, image QA, and multi-image next" describes in-progress state, whichCLAUDE.mdasks us to avoid, and it gets staler with each PR in the stack. It came in with #317 so it's already onmain; this is just the natural place to fix it.
Before merge
Nothing. Item 1 is a one-line delete if you want it in this PR, item 2 and the nit are fine as follow-ups. Merge once CI is green.
The scorer calls the shared response_text; the private copy had no caller left. The Molmo2 suite docstring described the stack's in-progress state.
|
Pushed 90094b8 with item 1 and the nit: the dead private |
- scoring/vqa.py becomes scoring/counting.py: in this PR it held only the counting scorer, and its _answers helper had no caller. - tasks/single_image.py becomes tasks/image_qa.py, after the ImageQATask it defines: the tasks are split by how they are scored, and pointing is single-image too. - pycocotools and scipy move from the hf extra to a new vision extra. They are the pointing scorer's dependencies and are needed whichever provider runs the model; under hf, an olmo_core_vlm install lacked them. The dev group pulls vision, so CI still exercises the scorer. - The gold-set builder no longer rebases paths it already built from the current data root.
|
Follow-up cleanup in 1d3110b, from a naming and packaging pass on this PR:
No behavior change: the moved definitions are AST-identical, all 377 |
Description
Third of five PRs splitting #278 (stack: #316 → #317 → this). Milestone: the complete pointing/counting family — 9 tasks, both suites, mm_olmo
_mpparity.Tasks
pixmo_points_eval/_mpsa_co_gold_subset/_mpsa_co_gold_point_4k_mpsa_co_gold_point_mpcountbench_qa,pixmo_countpoint_countstyle)Suites:
molmo2_pointing,molmo2_pointing_mp.Consolidation (Tyler's #5, continued)
PointingTaskandImageQATasksubclassVisionTaskand lose their byte-identicalinstances/format_requestblocks.tasks/single_image.pylands here because the counting benchmarks areImageQATasks that share the pointing prompt family; the QA benchmarks reuse it in PR 4.Scoring
scoring/pointing.py— COCO-RLE mask decode + maximum-bipartite point matching (pycocotools/scipy, lazily imported), the independent max-over-annotators, and the empty-GT⇒1.0 convention, all mirroring mm_olmo'sSegmentationPointingScorer.scoring/count_parsing.py— the vendored count parse ladder.scoring/vqa.pystarts with the shared answer helpers +PointCountScorer; the QA scorers append in PR 4.pycocotools + scipy join the
hfextra — the judge-style silent-zero failure mode (every instance failing to score reports f1 = 0.0000 with statusSuccess) is why these are declared task dependencies too.Verification
_mptemplates (pointing: <label>/ 43-template forms)pixmo_points_eval_mp0.8152 vs mm_olmo's stored 0.8083,sa_co_gold_subset_mp0.6631 vs 0.6658 — with 3,856/3,856 and 1,215/1,215 stored-prompt paritytycleanType of Change
Checklist
Part of #278 (tracking). Next: PR 4 — image QA.