mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
parent
c48bbde26f
commit
56eaac6d8f
@ -227,20 +227,20 @@ class VOLCRunner(BaseRunner):
|
|||||||
task_status = os.popen(ask_cmd).read()
|
task_status = os.popen(ask_cmd).read()
|
||||||
pattern = r'(?<=\[{"Status":").*(?="}\])'
|
pattern = r'(?<=\[{"Status":").*(?="}\])'
|
||||||
match = re.search(pattern, task_status)
|
match = re.search(pattern, task_status)
|
||||||
if match:
|
|
||||||
task_status = match.group()
|
|
||||||
else:
|
|
||||||
task_status = 'Exception'
|
|
||||||
if self.debug:
|
if self.debug:
|
||||||
print(task_status)
|
print(task_status)
|
||||||
logs = os.popen(log_cmd).read()
|
logs = os.popen(log_cmd).read()
|
||||||
with open(log_path, 'w', encoding='utf-8') as f:
|
with open(log_path, 'w', encoding='utf-8') as f:
|
||||||
f.write(logs)
|
f.write(logs)
|
||||||
if task_status in [
|
if match:
|
||||||
'Success', 'Failed', 'Cancelled', 'Exception',
|
task_status = match.group()
|
||||||
'Killing', 'SuccessHolding', 'FailedHolding'
|
if task_status in [
|
||||||
]:
|
'Success', 'Failed', 'Cancelled', 'Exception',
|
||||||
break
|
'Killing', 'SuccessHolding', 'FailedHolding',
|
||||||
|
'Killed'
|
||||||
|
]:
|
||||||
|
break
|
||||||
|
# If pattern not found or command failed, sleep and retry
|
||||||
time.sleep(poll_interval)
|
time.sleep(poll_interval)
|
||||||
else:
|
else:
|
||||||
task_status = 'Exception'
|
task_status = 'Exception'
|
||||||
|
Loading…
Reference in New Issue
Block a user