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
c380000e
Commit
c380000e
authored
Feb 03, 2021
by
Mostofa Patwary
Browse files
fixed exit interval
parent
097fa65b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
megatron/training.py
megatron/training.py
+3
-3
No files found.
megatron/training.py
View file @
c380000e
...
@@ -884,9 +884,9 @@ def train(forward_step_func, model, optimizer, lr_scheduler,
...
@@ -884,9 +884,9 @@ def train(forward_step_func, model, optimizer, lr_scheduler,
# Exiting based on iterations
# Exiting based on iterations
if
args
.
exit_interval
and
iteration
%
args
.
exit_interval
==
0
:
if
args
.
exit_interval
and
iteration
%
args
.
exit_interval
==
0
:
#
if not saved_checkpoint:
if
not
saved_checkpoint
:
#
save_checkpoint_and_time(iteration, model, optimizer,
save_checkpoint_and_time
(
iteration
,
model
,
optimizer
,
#
lr_scheduler)
lr_scheduler
)
torch
.
distributed
.
barrier
()
torch
.
distributed
.
barrier
()
print_datetime
(
'exiting program at iteration {}'
.
format
(
iteration
))
print_datetime
(
'exiting program at iteration {}'
.
format
(
iteration
))
sys
.
exit
()
sys
.
exit
()
...
...
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