[Fix] Use logger.error on failure (#960)

This commit is contained in:
Fengzhe Zhou 2024-03-12 11:51:39 +08:00 committed by GitHub
parent ed663ca17b
commit 64fde73b15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View File

@ -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)

View 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

View File

@ -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)

View 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: