From a8b41901a9066c29d0e3ac33df69af89c27adb41 Mon Sep 17 00:00:00 2001 From: John Bauer Date: Sat, 11 Jan 2025 13:58:07 -0800 Subject: [PATCH] Log which device is used for training a tagger --- stanza/models/tagger.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stanza/models/tagger.py b/stanza/models/tagger.py index c0a49d65d2..9fb6f02ccd 100644 --- a/stanza/models/tagger.py +++ b/stanza/models/tagger.py @@ -307,6 +307,8 @@ def train(args): global_start_time = time.time() format_str = 'Finished STEP {}/{}, loss = {:.6f} ({:.3f} sec/batch), lr: {:.6f}' + logger.debug("Training model on device %s", next(trainer.model.parameters()).device) + if args['adapt_eval_interval']: args['eval_interval'] = utils.get_adaptive_eval_interval(dev_data.num_examples, 2000, args['eval_interval']) logger.info("Evaluating the model every {} steps...".format(args['eval_interval']))