From 1671a3780b641965ea9e4ba360ac20cdb580832a Mon Sep 17 00:00:00 2001 From: zhang wenhui Date: Tue, 15 Sep 2020 10:11:02 +0800 Subject: [PATCH] fix dataloader log print (#217) --- core/trainers/framework/runner.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/trainers/framework/runner.py b/core/trainers/framework/runner.py index c50e608e..4e640043 100644 --- a/core/trainers/framework/runner.py +++ b/core/trainers/framework/runner.py @@ -203,9 +203,9 @@ class RunnerBase(object): end_time = time.time() seconds = end_time - begin_time metrics_logging = metrics[:] - metrics_logging = metrics.insert(1, seconds) + metrics_logging.insert(1, seconds) begin_time = end_time - logging.info(metrics_format.format(*metrics)) + logging.info(metrics_format.format(*metrics_logging)) if save_step_interval >= 1 and batch_id % save_step_interval == 0 and context[ "is_infer"] == False: @@ -225,6 +225,7 @@ class RunnerBase(object): is_fleet=context["is_fleet"], epoch_id=None, batch_id=batch_id) + batch_id += 1 except fluid.core.EOFException: reader.reset() -- GitLab