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
OpenDAS
Megatron-LM
Commits
0399d32c
Unverified
Commit
0399d32c
authored
May 14, 2019
by
Raul Puri
Committed by
GitHub
May 14, 2019
Browse files
fixed save race condition
parent
3573423f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
utils.py
utils.py
+1
-1
No files found.
utils.py
View file @
0399d32c
...
...
@@ -149,7 +149,7 @@ def save_checkpoint(model_suffix, epoch, i, model, optimizer, lr_scheduler, args
np
.
random
.
get_state
(),
random
.
getstate
())
if
not
(
torch
.
distributed
.
is_initialized
()
and
\
torch
.
distributed
.
get_rank
()
>
1
):
torch
.
distributed
.
get_rank
()
>
0
):
if
not
os
.
path
.
exists
(
checkpoint_dir
):
os
.
makedirs
(
checkpoint_dir
)
total_iters
=
args
.
train_iters
*
(
epoch
-
1
)
+
i
...
...
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