mirror of
https://github.com/saymrwulf/transformers.git
synced 2026-05-14 20:58:08 +00:00
Add ignore_errors=True to trainer.py rmtree in _inner_training_loop (#31668)
Update trainer.py
This commit is contained in:
parent
ddfaf11926
commit
65a02cd27d
1 changed files with 1 additions and 1 deletions
|
|
@ -2422,7 +2422,7 @@ class Trainer:
|
|||
for checkpoint in checkpoints_sorted:
|
||||
if not os.path.samefile(checkpoint, self.state.best_model_checkpoint):
|
||||
logger.info(f"Deleting older checkpoint [{checkpoint}] due to args.save_total_limit")
|
||||
shutil.rmtree(checkpoint)
|
||||
shutil.rmtree(checkpoint, ignore_errors=True)
|
||||
|
||||
self.control = self.callback_handler.on_train_end(args, self.state, self.control)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue