Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade default math pred_postprocessor #1340

Merged
merged 2 commits into from
Jul 22, 2024
Merged

Conversation

xu-song
Copy link
Contributor

@xu-song xu-song commented Jul 19, 2024

Upgrade default math pred_postprocessor from math_postprocess to math_postprocess_v2

Motivation

As mentioned in document, the default pred_postprocessor is math_postprocess_v2 in both math_4shot_base_gen_db136b and math_0shot_gen_393424.

math_postprocess_v2 is more robust than math_postprocess.

def math_postprocess(text: str) -> str:
for maybe_ans in text.split('.'):
if 'final answer' in maybe_ans.lower():

@xu-song xu-song changed the title Change default math postprocessor Upgrade default math pred_postprocessor Jul 19, 2024
@tonysy tonysy requested a review from liushz July 22, 2024 02:33
Copy link
Collaborator

@liushz liushz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@liushz liushz merged commit e938482 into open-compass:main Jul 22, 2024
4 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.

3 participants