From 5d07415371cd3099d3a6e259cbe2e08325018038 Mon Sep 17 00:00:00 2001 From: yejj Date: Wed, 24 Jun 2026 17:33:27 +0800 Subject: [PATCH] bugfix: Support for extracting answers expressed in thousand separators for numbers. --- ais_bench/benchmark/datasets/gsm8k.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ais_bench/benchmark/datasets/gsm8k.py b/ais_bench/benchmark/datasets/gsm8k.py index 1e44190d..cc84932e 100644 --- a/ais_bench/benchmark/datasets/gsm8k.py +++ b/ais_bench/benchmark/datasets/gsm8k.py @@ -46,7 +46,7 @@ def gsm8k_dataset_postprocess(text: str) -> str: @TEXT_POSTPROCESSORS.register_module('gsm8k') def gsm8k_postprocess(text: str) -> str: - text = text.split('Question:')[0] + text = text.split('Question:')[0].replace(',', '') numbers = re.findall(r'\-?\d+\.\d+|\-?\d+', text) if not numbers: return 'NULL'