Add cli logger control.

pull/1472/head
KP 3 years ago
parent 94ed5969fa
commit d36a4ccfc8

@ -484,7 +484,7 @@ class ASRExecutor(BaseExecutor):
force_yes = parser_args.yes force_yes = parser_args.yes
device = parser_args.device device = parser_args.device
if not args.verbose: if not parser_args.verbose:
self.disable_task_loggers() self.disable_task_loggers()
task_source = self.get_task_source(parser_args.input) task_source = self.get_task_source(parser_args.input)
@ -501,7 +501,7 @@ class ASRExecutor(BaseExecutor):
task_results[id_] = f'{e.__class__.__name__}: {e}' task_results[id_] = f'{e.__class__.__name__}: {e}'
self.process_task_results(parser_args.input, task_results, self.process_task_results(parser_args.input, task_results,
args.job_dump_result) parser_args.job_dump_result)
if has_exceptions: if has_exceptions:
return False return False

@ -248,7 +248,7 @@ class CLSExecutor(BaseExecutor):
topk = parser_args.topk topk = parser_args.topk
device = parser_args.device device = parser_args.device
if not args.verbose: if not parser_args.verbose:
self.disable_task_loggers() self.disable_task_loggers()
task_source = self.get_task_source(parser_args.input) task_source = self.get_task_source(parser_args.input)
@ -265,7 +265,7 @@ class CLSExecutor(BaseExecutor):
task_results[id_] = f'{e.__class__.__name__}: {e}' task_results[id_] = f'{e.__class__.__name__}: {e}'
self.process_task_results(parser_args.input, task_results, self.process_task_results(parser_args.input, task_results,
args.job_dump_result) parser_args.job_dump_result)
if has_exceptions: if has_exceptions:
return False return False

@ -332,7 +332,7 @@ class STExecutor(BaseExecutor):
ckpt_path = parser_args.ckpt_path ckpt_path = parser_args.ckpt_path
device = parser_args.device device = parser_args.device
if not args.verbose: if not parser_args.verbose:
self.disable_task_loggers() self.disable_task_loggers()
task_source = self.get_task_source(parser_args.input) task_source = self.get_task_source(parser_args.input)
@ -349,7 +349,7 @@ class STExecutor(BaseExecutor):
task_results[id_] = f'{e.__class__.__name__}: {e}' task_results[id_] = f'{e.__class__.__name__}: {e}'
self.process_task_results(parser_args.input, task_results, self.process_task_results(parser_args.input, task_results,
args.job_dump_result) parser_args.job_dump_result)
if has_exceptions: if has_exceptions:
return False return False

@ -275,7 +275,7 @@ class TextExecutor(BaseExecutor):
punc_vocab = parser_args.punc_vocab punc_vocab = parser_args.punc_vocab
device = parser_args.device device = parser_args.device
if not args.verbose: if not parser_args.verbose:
self.disable_task_loggers() self.disable_task_loggers()
task_source = self.get_task_source(parser_args.input) task_source = self.get_task_source(parser_args.input)
@ -292,7 +292,7 @@ class TextExecutor(BaseExecutor):
task_results[id_] = f'{e.__class__.__name__}: {e}' task_results[id_] = f'{e.__class__.__name__}: {e}'
self.process_task_results(parser_args.input, task_results, self.process_task_results(parser_args.input, task_results,
args.job_dump_result) parser_args.job_dump_result)
if has_exceptions: if has_exceptions:
return False return False

Loading…
Cancel
Save