From 7b4b0cf966df3dc790dc8914afe4862195c87af7 Mon Sep 17 00:00:00 2001 From: thomwolf Date: Fri, 8 Feb 2019 11:16:29 +0100 Subject: [PATCH] logging --- examples/run_openai_gpt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/run_openai_gpt.py b/examples/run_openai_gpt.py index 1c944d8285..638d4bf123 100644 --- a/examples/run_openai_gpt.py +++ b/examples/run_openai_gpt.py @@ -202,7 +202,7 @@ def main(): tr_loss += loss.item() nb_tr_examples += input_ids.size(0) nb_tr_steps += 1 - tqdm_bar.desc = "Training loss: {:e.2}".format(tr_loss/nb_tr_steps) + tqdm_bar.desc = "Training loss: {:.2e}".format(tr_loss/nb_tr_steps) # Save a trained model model_to_save = model.module if hasattr(model, 'module') else model # Only save the model it-self