From d837c5f088d4276ed0dec1a89c325d8bafb7508d Mon Sep 17 00:00:00 2001 From: frankwhzhang Date: Mon, 14 Sep 2020 17:09:10 +0800 Subject: [PATCH] fix dataloader log print --- core/trainers/framework/runner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/trainers/framework/runner.py b/core/trainers/framework/runner.py index 8bf64a71..fbc961f4 100644 --- a/core/trainers/framework/runner.py +++ b/core/trainers/framework/runner.py @@ -199,9 +199,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)) batch_id += 1 except fluid.core.EOFException: reader.reset() -- GitLab