Skip to content

Commit

Permalink
Add load_best_model_at_end=True
Browse files Browse the repository at this point in the history
  • Loading branch information
ArmelRandy authored Jun 29, 2023
1 parent 0d275cd commit d72c7fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion finetune/finetune.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ def run_training(args, train_data, val_data):
output_dir=args.output_dir,
dataloader_drop_last=True,
evaluation_strategy="steps",
save_strategy="steps",
load_best_model_at_end=True,
max_steps=args.max_steps,
eval_steps=args.eval_freq,
save_steps=args.save_freq,
Expand Down Expand Up @@ -309,4 +311,4 @@ def main(args):

logging.set_verbosity_error()

main(args)
main(args)

0 comments on commit d72c7fe

Please sign in to comment.