Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
7b0727a4
Unverified
Commit
7b0727a4
authored
Jan 03, 2023
by
Anna Krogager
Committed by
GitHub
Jan 03, 2023
Browse files
Ignore errors when deleting old checkpoints in trainer (#20984)
parent
15c68c67
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/trainer.py
src/transformers/trainer.py
+1
-1
No files found.
src/transformers/trainer.py
View file @
7b0727a4
...
...
@@ -2776,7 +2776,7 @@ class Trainer:
checkpoints_to_be_deleted
=
checkpoints_sorted
[:
number_of_checkpoints_to_delete
]
for
checkpoint
in
checkpoints_to_be_deleted
:
logger
.
info
(
f
"Deleting older checkpoint [
{
checkpoint
}
] due to args.save_total_limit"
)
shutil
.
rmtree
(
checkpoint
)
shutil
.
rmtree
(
checkpoint
,
ignore_errors
=
True
)
def
evaluate
(
self
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment