Skip to content

Commit

Permalink
[Fix] Update common summarizer regex extraction (#1631)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaiziXiao authored Oct 22, 2024
1 parent a927bba commit be3c06a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opencompass/summarizers/subjective/common_summarizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def post_process_single_rate(judgement: str):
xxx[[5]]xxx, and extract the score
"""
pattern = r'Rating:\s*\[\[([\d.]+)\]\]'
pattern = r'\[\[([\d.]+)\]\]'
matched_result = re.findall(pattern, judgement)
if matched_result:
score = float(matched_result[0])
Expand Down

0 comments on commit be3c06a

Please sign in to comment.