mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
[Fix] Use logger.error on failure (#960)
This commit is contained in:
parent
ed663ca17b
commit
64fde73b15
@ -189,7 +189,7 @@ class LocalRunner(BaseRunner):
|
||||
stderr=stdout)
|
||||
|
||||
if result.returncode != 0:
|
||||
logger.warning(f'task {task_name} fail, see\n{out_path}')
|
||||
logger.error(f'task {task_name} fail, see\n{out_path}')
|
||||
finally:
|
||||
# Clean up
|
||||
os.remove(param_file)
|
||||
|
@ -128,7 +128,7 @@ def launch(task: BaseTask, tokens: SyncManager.Semaphore):
|
||||
traceback.print_exc()
|
||||
# reset stdout and stderr
|
||||
reset_std()
|
||||
logger.warning(f'task {task_name} fail, see\n{out_path}')
|
||||
logger.error(f'task {task_name} fail, see\n{out_path}')
|
||||
returncode = 1
|
||||
else:
|
||||
# reset stdout and stderr
|
||||
|
@ -151,7 +151,7 @@ class SlurmRunner(BaseRunner):
|
||||
stderr=stdout)
|
||||
|
||||
if result.returncode != 0 and not self.debug:
|
||||
logger.warning(f'task {task_name} fail, see\n{out_path}')
|
||||
logger.error(f'task {task_name} fail, see\n{out_path}')
|
||||
finally:
|
||||
# Clean up
|
||||
os.remove(param_file)
|
||||
|
@ -242,7 +242,7 @@ class SlurmSequentialRunner(BaseRunner):
|
||||
retry -= 1
|
||||
cmd = get_cmd()
|
||||
else:
|
||||
logger.warning(
|
||||
logger.error(
|
||||
f'task {task_name} fail, see\n{out_path}')
|
||||
break
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user