Print test results only if prog_bar_metrics is not empty (#1411)
* Print test results only if prog_bar_metrics is not empty * Update evaluation_loop.py Co-authored-by: vitor-guizilini <vitor.guizilini@tri.global> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
This commit is contained in:
parent
7d0c2c7db8
commit
2ae2bd2b46
|
@ -377,12 +377,11 @@ class TrainerEvaluationLoopMixin(ABC):
|
|||
self.add_tqdm_metrics(prog_bar_metrics)
|
||||
|
||||
# log results of test
|
||||
if test_mode:
|
||||
if self.proc_rank == 0:
|
||||
print('-' * 100)
|
||||
if test_mode and self.proc_rank == 0 and prog_bar_metrics:
|
||||
print('-' * 80)
|
||||
print('TEST RESULTS')
|
||||
pprint(prog_bar_metrics)
|
||||
print('-' * 100)
|
||||
print('-' * 80)
|
||||
|
||||
# log metrics
|
||||
self.log_metrics(log_metrics, {})
|
||||
|
|
Loading…
Reference in New Issue