Skip to content

Commit

Permalink
Report some details of the model being loaded after loading it
Browse files Browse the repository at this point in the history
  • Loading branch information
AngledLuffa committed Jan 31, 2024
1 parent 3cd4be7 commit c482a0c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stanza/models/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ def train(args):

if args.get("checkpoint") and os.path.exists(args["checkpoint_save_name"]):
trainer = Trainer(args=args, pretrain=pretrain, vocab=vocab, model_file=args["checkpoint_save_name"], device=args['device'], ignore_model_config=True)
if len(trainer.dev_score_history) > 0:
logger.info("Continuing from checkpoint %s Model was previously trained for %d steps, with a best dev score of %.4f", args["checkpoint_save_name"], trainer.global_step, max(trainer.dev_score_history))
elif args["continue_from"]:
if not os.path.exists(args["continue_from"]):
raise FileNotFoundError("--continue_from specified, but the file %s does not exist" % args["continue_from"])
Expand Down

0 comments on commit c482a0c

Please sign in to comment.