Skip to content

Commit

Permalink
Bugfix for Iteration 0 checkpointing (#764)
Browse files Browse the repository at this point in the history
* bugfix iteration 0 checkpointing

* Update NeoXArgs docs automatically

Co-authored-by: github-actions <[email protected]>
  • Loading branch information
haileyschoelkopf and github-actions committed Jan 6, 2023
1 parent 008fbec commit 375de3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion configs/neox_arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Logging Arguments

- **git_hash**: str

Default = 27e56e3
Default = 075a525

current git hash of repository

Expand Down
6 changes: 3 additions & 3 deletions megatron/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ def pretrain(neox_args):
timers.log(["model and optimizer", "train/valid/test data iterators"])
print_rank_0("training ...")

iteration = 0
iteration = neox_args.iteration
if neox_args.do_train and neox_args.train_iters > 0:
# edge case: save step 0 checkpoint if requested
if neox_args.save and 0 in neox_args.save_iters:
# edge case: save step 0 checkpoint if requested and we're starting from step 0
if neox_args.save and 0 in neox_args.save_iters and iteration == 0:
save_checkpoint(
neox_args=neox_args,
iteration=iteration,
Expand Down

0 comments on commit 375de3f

Please sign in to comment.