Skip to content

Fix str(res) typo in post_check for non-numeric answers - #1680

Merged
ssiq merged 1 commit into
open-compass:mainfrom
rrrxxx0510:fix/mathvista-post-check-str-res
Sep 18, 2026
Merged

ssiq merged 1 commit into
open-compass:mainfrom
rrrxxx0510:fix/mathvista-post-check-str-res

Conversation

@rrrxxx0510

Copy link
Copy Markdown
Contributor

Fixes #1679

The non-numeric branch of post_check compared str(res) where res is always None, so free-form questions with a non integer/float answer type could never be scored correct, even when the GPT judge extracted the right answer.

Day-one typo from #29. lens.py and ocr_reasoning.py, which were derived from the same template, correctly use str(response) here — confirming the intended behavior. qspatial.py copied the same typo; fixed both.

On the shipped MathVista_MINI TSV the blast radius is the 2 samples with answer_type == 'list' (the 540 text answers are all multi-choice and take the other branch), so this mostly matters for correctness and for any future/custom TSVs with free-form text answers.

Verified with a direct call into post_check before and after: a correct text answer was marked wrong before, and is scored correctly after; wrong answers and integer answers behave unchanged.

@ssiq

ssiq commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the updates. These three commits seem to address separate issues:

  1. preserving structured extra_records
  2. adding a Transformers model-class fallback
  3. fixing the str(res) typo in MathVista/QSpatial

Would you mind splitting them into three separate PRs? That would make the changes easier to review, test, and merge independently.

The non-numeric branch of post_check compared str(res) where res is
always None, so free-form questions with a non integer/float answer
type could never be scored correct, even when the GPT judge extracted
the right answer. Day-one typo from open-compass#29; lens.py and ocr_reasoning.py,
which were derived from the same template, correctly use
str(response) here. qspatial.py copied the same typo.

Fixes open-compass#1679
@rrrxxx0510
rrrxxx0510 force-pushed the fix/mathvista-post-check-str-res branch from 22f1f20 to d6cc31b Compare September 14, 2026 11:40
@rrrxxx0510

Copy link
Copy Markdown
Contributor Author

Both PRs are now single-commit — the fallback fix stays in #1676 and the typo fix in #1680. The extra_records change was never supposed to be in there, it sits on its own branch and I'll send it as a separate PR once #1665 gets some feedback. My bad for stacking the branches, and thanks for catching it.

@rrrxxx0510

Copy link
Copy Markdown
Contributor Author

按你说的拆好了,单 commit——typo 这条单独留着,fallback 那个归 #1676

force-push 之后 CI 批准被重置了,两个 check 还都是 action_required 没跑起来。麻烦再看下 workflow?

@ssiq
ssiq added this pull request to the merge queue Sep 18, 2026
Merged via the queue into open-compass:main with commit 2ae7b28 Sep 18, 2026
20 of 21 checks passed
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.

MathVista post_check: non-numeric answers can never be scored correct (str(res) typo, also in qspatial)

2 participants