Skip to content

Commit

Permalink
Log which device is used for training a tagger
Browse files Browse the repository at this point in the history
  • Loading branch information
AngledLuffa committed Jan 11, 2025
1 parent 37b0416 commit a8b4190
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stanza/models/tagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']))
Expand Down

0 comments on commit a8b4190

Please sign in to comment.