mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
[Fix] Update common summarizer regex extraction (#1631)
This commit is contained in:
parent
a927bba1cf
commit
be3c06a158
@ -28,7 +28,7 @@ def post_process_single_rate(judgement: str):
|
|||||||
|
|
||||||
xxx[[5]]xxx, and extract the score
|
xxx[[5]]xxx, and extract the score
|
||||||
"""
|
"""
|
||||||
pattern = r'Rating:\s*\[\[([\d.]+)\]\]'
|
pattern = r'\[\[([\d.]+)\]\]'
|
||||||
matched_result = re.findall(pattern, judgement)
|
matched_result = re.findall(pattern, judgement)
|
||||||
if matched_result:
|
if matched_result:
|
||||||
score = float(matched_result[0])
|
score = float(matched_result[0])
|
||||||
|
Loading…
Reference in New Issue
Block a user