Repository navigation
feat(math): unify mathematical scoring with Math-Verify - #1785
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Two moderate review findings remain unresolved.
Review effort: Lite
Findings: None
What changed in this PR
This PR unifies mathematical scoring around Math-Verify, adds bounded worker execution, and updates affected benchmarks, dependencies, tests, validation tooling, and documentation.
Changes:
- Replaces legacy mathematical parsers and graders with Math-Verify.
- Adds worker pooling, timeout handling, cleanup, and failure management.
- Updates benchmark versions, scoring policies, dependencies, tests, and documentation.
Review findings:
- Moderate: HiPhO grading can abort on an unparseable reference before failure handling.
- Moderate: Numeric
Accuracymay treat complete reasoning responses as fragments.
| File | Reviewed change |
|---|---|
tests/metrics/test_omega_aigc.py |
OmegaConf and AIGC compatibility tests |
tests/metrics/test_math_verify.py |
Math-Verify scoring regression coverage |
tests/metrics/test_math_runtime.py |
Worker runtime and failure handling tests |
tests/metrics/test_instrument_reading.py |
Chart and instrument scoring tests |
tests/api/test_math_evaluation_versions.py |
Evaluation version and replay tests |
scripts/validation/update_math_docs.py |
Validation documentation update tooling |
scripts/validation/report_math.py |
Mathematical validation reporting |
scripts/validation/regrade_math.py |
Regrading validation workflow |
scripts/validation/measure_math_runtime.py |
Runtime measurement tooling |
scripts/validation/math_adapter_fixtures.py |
Adapter validation fixtures |
requirements/framework.txt |
Framework mathematical dependencies |
requirements/aigc.txt |
AIGC OmegaConf pin |
evalscope/metrics/nlp/metrics.py |
Shared numeric metric integration |
evalscope/metrics/math/worker.py |
Isolated Math-Verify worker |
evalscope/metrics/math/runtime.py |
Worker pool and lifecycle management |
evalscope/metrics/math/contracts.py |
Cross-process contracts |
evalscope/evaluator/evaluator.py |
Mathematical worker cleanup |
evalscope/benchmarks/tir_bench/utils.py |
Shared TIR mathematical scoring |
evalscope/benchmarks/tir_bench/tir_bench_adapter.py |
TIR adapter migration |
evalscope/benchmarks/poly_math/poly_math_adapter.py |
PolyMath scoring migration |
evalscope/benchmarks/omnidoc_bench/legacy/requirements.txt |
Optional dependency relocation |
evalscope/benchmarks/olympiad_bench/utils.py |
Olympiad scoring utilities |
evalscope/benchmarks/olympiad_bench/requirements.txt |
Olympiad dependencies |
evalscope/benchmarks/olympiad_bench/olympiad_bench_adapter.py |
Olympiad adapter migration |
evalscope/benchmarks/minerva_math/minerva_math_adapter.py |
Minerva scoring migration |
evalscope/benchmarks/mgsm/mgsm_adapter.py |
MGSM scoring migration |
evalscope/benchmarks/measure_bench/utils.py |
Shared numeric and unit parsing |
evalscope/benchmarks/measure_bench/measure_bench_adapter.py |
MeasureBench scoring migration |
evalscope/benchmarks/math_vista/math_vista_adapter.py |
MathVista scoring compatibility |
evalscope/benchmarks/math_vision/math_vision_adapter.py |
MathVision scoring compatibility |
evalscope/benchmarks/math_verse/math_verse_adapter.py |
MathVerse scoring compatibility |
evalscope/benchmarks/math_500/math_500_adapter.py |
MATH-500 scoring migration |
evalscope/benchmarks/imo_answerbench/imo_answerbench_adapter.py |
IMO AnswerBench scoring migration |
evalscope/benchmarks/hmmt/utils.py |
HMMT extraction utilities |
evalscope/benchmarks/hmmt/hmmt26_adapter.py |
HMMT 2026 adapter migration |
evalscope/benchmarks/hmmt/hmmt25_adapter.py |
HMMT 2025 adapter migration |
evalscope/benchmarks/hmmt/hmmt_nov25_adapter.py |
HMMT November 2025 adapter migration |
evalscope/benchmarks/hipho/utils.py |
HiPhO extraction utilities |
evalscope/benchmarks/hipho/hipho_adapter.py |
HiPhO Math-Verify grading |
evalscope/benchmarks/gsm8k/gsm8k_adapter.py |
GSM8K scoring migration |
evalscope/benchmarks/gsm8k_v/gsm8k_v_adapter.py |
GSM8K-V scoring migration |
evalscope/benchmarks/gsm8k_indic/gsm8k_indic_adapter.py |
Indic GSM8K scoring migration |
evalscope/benchmarks/docmath/utils.py |
DocMath extraction utilities |
evalscope/benchmarks/docmath/docmath_adapter.py |
DocMath scoring migration |
evalscope/benchmarks/competition_math/competition_math_adapter.py |
Competition Math scoring migration |
evalscope/benchmarks/cmmu/cmmu_adapter.py |
CMMU scoring migration |
evalscope/benchmarks/cmath/cmath_adapter.py |
CMATH scoring migration |
evalscope/benchmarks/chartqa/utils.py |
ChartQA numeric handling |
evalscope/benchmarks/chartqa/chartqa_adapter.py |
ChartQA scoring migration |
evalscope/benchmarks/arxivmath/arxivmath_adapter.py |
ArXivMath scoring migration |
evalscope/benchmarks/amc/amc_adapter.py |
AMC scoring migration |
evalscope/benchmarks/aime/math_normalize.py |
AIME normalization removal/update |
evalscope/benchmarks/aime/grader.py |
AIME legacy grader removal/update |
evalscope/benchmarks/aime/aime_adapter.py |
AIME scoring migration |
evalscope/benchmarks/agieval/agieval_adapter.py |
AGIEval scoring migration |
evalscope/benchmarks/_meta/docmath.json |
DocMath evaluation metadata |
evalscope/benchmarks/_meta/aime26.json |
AIME 2026 evaluation metadata |
evalscope/benchmarks/_meta/aime25.json |
AIME 2025 evaluation metadata |
evalscope/api/metric/exceptions.py |
Metric-unavailable exception handling |
evalscope/api/benchmark/adapters/default_data_adapter.py |
Exclusion and fallback handling |
docs/zh/benchmarks/olympiad_bench.md |
Chinese Olympiad documentation |
docs/zh/benchmarks/docmath.md |
Chinese DocMath documentation |
docs/zh/benchmarks/aime26.md |
Chinese AIME 2026 documentation |
docs/zh/benchmarks/aime25.md |
Chinese AIME 2025 documentation |
docs/en/benchmarks/olympiad_bench.md |
English Olympiad documentation |
docs/en/benchmarks/docmath.md |
English DocMath documentation |
docs/en/benchmarks/aime26.md |
English AIME 2026 documentation |
docs/en/benchmarks/aime25.md |
English AIME 2025 documentation |
.gitignore |
Local validation artifact exclusions |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Yunnglin
added a commit
that referenced
this pull request
Oct 15, 2026
…1860) * fix(olympiad_bench): read full-width commas in answers as separators Chinese OlympiadBench references separate answers with a full-width comma ('$4$,$30$'). The official judge maps ',' to ','; that mapping was dropped when scoring moved to Math-Verify (#1785), so these references either fail to parse and drop out of the denominator, or score 0 against an answer written with the ASCII commas the prompt asks for. Map ',' to ',' in the reference and the prediction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(olympiad_bench): bump evaluation_version to v1.3 Full-width comma normalization changes default scoring semantics, so cached v1.2 reviews must be invalidated and rescored. --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Yunnglin <mao.looper@qq.com>
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.
Fixes #1774
Fixes #1783
Supersedes the partial percentage fix in #1775 with shared Math-Verify grading.
Changes
EvalScope could accept numeric answers differing by 100x and award full credit for two empty answers. Mathematical extraction, parsing and equivalence now delegate to
math-verify[antlr4_13_2]==0.9.0, replacing copied parsers and symbolic graders without a legacy fallback.strict=True,float_rounding=6,numeric_precision=15).1800vs18and0.18vs18do not match;18%vs0.18matches. Upstream integer percentage compatibility (10vs10%) is retained.eval, failed-parse-to-zero and unconditional scale matching. Choice, text and OCR scoring keep their existing paths.parsing_timeout=Noneandtimeout_seconds=None. Remove the custom subprocess pool, worker module, cross-process request schema and evaluator lifecycle hook. No mathematical hard deadline is provided.omegaconf==2.4.0.dev15only in AIGC requirements. Remove redundant base ANTLR, SymPy, LaTeX andword2numberdeclarations, and movepylatexencto OmniDocBench optional requirements.v1.1; OlympiadBenchv1.2). Old reviews cannot be reused directly;rerun_review=Truereuses saved predictions and recomputes scores.Validation
make lint,make lint-imports, offlinetest_ci_liteand isolated-environmentpip checkpassed. Clean base/AIGC/OlympiadBench installation was verified at the preceding migration stage. No paid inference was used. One-off validation scripts, local datasets and reports are excluded from this PR.Compatibility
The latest direct-call implementation was validated on macOS; Linux and Windows were not rerun. The external VLMEvalKit package is outside this change:
ms-vlmeval==0.0.20requires ANTLR 4.11.1, conflicting with 4.13.2, so compatibility of thevlmevalandallextras is not claimed. Fixed-output replay validates scoring, not model performance.