Skip to content

Commit 1671a37

Browse files
authored
fix dataloader log print (#217)
1 parent 165dd81 commit 1671a37

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/trainers/framework/runner.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,9 @@ def _executor_dataloader_train(self, model_dict, context):
203203
end_time = time.time()
204204
seconds = end_time - begin_time
205205
metrics_logging = metrics[:]
206-
metrics_logging = metrics.insert(1, seconds)
206+
metrics_logging.insert(1, seconds)
207207
begin_time = end_time
208-
logging.info(metrics_format.format(*metrics))
208+
logging.info(metrics_format.format(*metrics_logging))
209209

210210
if save_step_interval >= 1 and batch_id % save_step_interval == 0 and context[
211211
"is_infer"] == False:
@@ -225,6 +225,7 @@ def _executor_dataloader_train(self, model_dict, context):
225225
is_fleet=context["is_fleet"],
226226
epoch_id=None,
227227
batch_id=batch_id)
228+
228229
batch_id += 1
229230
except fluid.core.EOFException:
230231
reader.reset()

0 commit comments

Comments
 (0)