mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
TimeOutError exception handling
This commit is contained in:
parent
5fb578aa00
commit
2fc30a92ec
@ -330,7 +330,11 @@ class MBPPEvaluator(BaseEvaluator):
|
||||
r"'(.*)'\s*\[DONE\]",
|
||||
]
|
||||
for p in patterns:
|
||||
match = re.search(p, text, re.DOTALL, timeout=10.0)
|
||||
try:
|
||||
match = re.search(p, text, re.DOTALL, timeout=10.0)
|
||||
except TimeoutError:
|
||||
match = None
|
||||
|
||||
if match:
|
||||
text = match.group(1)
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user