diff --git a/opencompass/openicl/icl_evaluator/math_evaluator.py b/opencompass/openicl/icl_evaluator/math_evaluator.py index 48764252..fd93a7c9 100644 --- a/opencompass/openicl/icl_evaluator/math_evaluator.py +++ b/opencompass/openicl/icl_evaluator/math_evaluator.py @@ -22,8 +22,9 @@ class MATHEvaluator(BaseEvaluator): details = [] for i, j in zip(predictions, references): count += 1 + j_with_env = f'${j}$' gold_parsed = parse( - j, + j_with_env, extraction_mode='first_match', extraction_config=[ LatexExtractionConfig(), @@ -32,16 +33,16 @@ class MATHEvaluator(BaseEvaluator): ) # If parsing result is empty, try adding LaTeX # environment and parse again - if len(gold_parsed) == 0: - j_with_env = f'${j}$' - gold_parsed = parse( - j_with_env, - extraction_mode='first_match', - extraction_config=[ - LatexExtractionConfig(), - ExprExtractionConfig(), - ], - ) + # if len(gold_parsed) == 0: + # j_with_env = f'${j}$' + # gold_parsed = parse( + # j_with_env, + # extraction_mode='first_match', + # extraction_config=[ + # LatexExtractionConfig(), + # ExprExtractionConfig(), + # ], + # ) if len(gold_parsed) != 0: # We require the answer to be provided in correct # latex (no malformed operators)