-
Notifications
You must be signed in to change notification settings - Fork 27.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trainer.train argument resume_from_last_checkpoint #10280
Comments
Instead of adding a new argument, I would use the existing |
Yes, SGTM. I have raised a PR doing the same. Do let me know if there is any other change required as well! PS: Can you also review my other PR introducing Thanks! |
Enhance resume_from_checkpoint argument of Trainer.train to accept bool type. If True given, last saved checkpoint in self.args.output_dir will be loaded. (huggingface#10280)
Enhance resume_from_checkpoint argument of Trainer.train to accept bool type. If True given, last saved checkpoint in self.args.output_dir will be loaded. (#10280)
|
🚀 Feature request
Trainer.train
acceptsresume_from_checkpoint
argument, which requires the user to explicitly provide the checkpoint location to continue training from.resume_from_last_checkpoint
can be useful to resume training by picking the latest checkpoint fromoutput_dir
of theTrainingArguments
passed.Motivation
resume_from_checkpoint
output_dir
they provided initiallyThis motivates to provide a
resume_from_last_checkpoint=True
to theTrainer.train(...)
call, which will pick the latest checkpoint fromargs.output_dir
. FYIget_last_checkpoint
function fromtrainer_utils
can be used to do exactly the same.Your contribution
I can raise a PR if it is a useful feature to have!
The text was updated successfully, but these errors were encountered: