Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stanfordnlp/stanza.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Bauer <horatio@gmail.com>2022-09-08 20:00:04 +0300
committerJohn Bauer <horatio@gmail.com>2022-09-08 20:00:17 +0300
commit1d33718ab625da4251f8b6863f9b74a13c5fa09a (patch)
tree67f4577bdd1260c54162f0ba9d2f560a2eb7ddb9
parente60c6aa390fca4d36eefa56c2d40ac8737568c0f (diff)
Reformat epoch logging in the conparser
-rw-r--r--stanza/models/constituency/trainer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/stanza/models/constituency/trainer.py b/stanza/models/constituency/trainer.py
index 37d4a6a1..e71986fe 100644
--- a/stanza/models/constituency/trainer.py
+++ b/stanza/models/constituency/trainer.py
@@ -571,7 +571,7 @@ def iterate_training(args, trainer, train_trees, train_sequences, transitions, d
trainer.save(model_latest_filename, save_optimizer=True)
if model_save_each_filename:
trainer.save(model_save_each_filename % epoch, save_optimizer=True)
- logger.info("Epoch {} finished\nTransitions correct: {} Transitions incorrect: {}\n Total loss for epoch: {}\n Dev score ({:5}): {}\n Best dev score ({:5}): {}".format(epoch, epoch_stats.transitions_correct, epoch_stats.transitions_incorrect, epoch_stats.epoch_loss, epoch, f1, best_epoch, best_f1))
+ logger.info("Epoch %d finished\n Transitions correct: %s\n Transitions incorrect: %s\n Total loss for epoch: %.5f\n Dev score (%5d): %8f\n Best dev score (%5d): %8f", epoch, epoch_stats.transitions_correct, epoch_stats.transitions_incorrect, epoch_stats.epoch_loss, epoch, f1, best_epoch, best_f1)
if args['wandb']:
wandb.log({'epoch_loss': epoch_stats.epoch_loss, 'dev_score': f1}, step=epoch)