mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
fix
This commit is contained in:
parent
3a9a384173
commit
01b0ee6ee6
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user