未验证 提交 1671a378 编写于 作者: Z zhang wenhui 提交者: GitHub

fix dataloader log print (#217)

上级 165dd817
...@@ -203,9 +203,9 @@ class RunnerBase(object): ...@@ -203,9 +203,9 @@ class RunnerBase(object):
end_time = time.time() end_time = time.time()
seconds = end_time - begin_time seconds = end_time - begin_time
metrics_logging = metrics[:] metrics_logging = metrics[:]
metrics_logging = metrics.insert(1, seconds) metrics_logging.insert(1, seconds)
begin_time = end_time 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[ if save_step_interval >= 1 and batch_id % save_step_interval == 0 and context[
"is_infer"] == False: "is_infer"] == False:
...@@ -225,6 +225,7 @@ class RunnerBase(object): ...@@ -225,6 +225,7 @@ class RunnerBase(object):
is_fleet=context["is_fleet"], is_fleet=context["is_fleet"],
epoch_id=None, epoch_id=None,
batch_id=batch_id) batch_id=batch_id)
batch_id += 1 batch_id += 1
except fluid.core.EOFException: except fluid.core.EOFException:
reader.reset() reader.reset()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册