Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DesmonDay committed Oct 17, 2024
1 parent 18c385d commit a5af947
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion paddlenlp/trainer/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,9 @@ def _load_from_checkpoint(self, resume_from_checkpoint=None):
# Load potential model checkpoint
if isinstance(resume_from_checkpoint, bool) and resume_from_checkpoint:
uc_async_save = self.args.unified_checkpoint and "async_save" in self.args.unified_checkpoint_config
resume_from_checkpoint = get_last_checkpoint(self.args.output_dir, uc_async_save)
resume_from_checkpoint = get_last_checkpoint(
self.args.output_dir, signal_folder=self.args.output_signal_dir, uc_async_save=uc_async_save
)
if resume_from_checkpoint is None:
raise ValueError(f"No valid checkpoint found in output directory ({self.args.output_dir})")

Expand Down

0 comments on commit a5af947

Please sign in to comment.