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
1c286be5
Unverified
Commit
1c286be5
authored
Dec 16, 2023
by
dumpmemory
Committed by
GitHub
Dec 15, 2023
Browse files
Fix bug for checkpoint saving on multi node training setting (#28078)
* add multi-node traning setting * fix style
parent
dec84b32
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
src/transformers/trainer.py
src/transformers/trainer.py
+3
-1
No files found.
src/transformers/trainer.py
View file @
1c286be5
...
...
@@ -2386,7 +2386,9 @@ class Trainer:
self
.
args
.
distributed_state
.
wait_for_everyone
()
# Then go through the rewriting process starting on process 0
if
staging_output_dir
!=
output_dir
:
with
self
.
args
.
main_process_first
(
desc
=
"Renaming model checkpoint folder to true location"
):
with
self
.
args
.
main_process_first
(
desc
=
"Renaming model checkpoint folder to true location"
,
local
=
self
.
args
.
save_on_each_node
):
if
os
.
path
.
exists
(
staging_output_dir
):
os
.
rename
(
staging_output_dir
,
output_dir
)
...
...
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