Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added train_samples keyword for compliance check #645

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions large_language_model/megatron-lm/megatron/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ def pretrain(train_valid_test_dataset_provider,
args_defaults: a dictionary from argument-name to argument-value. It
to set already parse arguments.
"""
# The reference implementation does not clear the cache currently
# but the submissions are required to do so
mllogger.event(key=mllogger.constants.CACHE_CLEAR, value=True)
mllogger.start(key=mllogger.constants.INIT_START, sync=False)

# Initalize and get arguments, timers, and Tensorboard writer.
Expand Down Expand Up @@ -232,6 +235,9 @@ def pretrain(train_valid_test_dataset_provider,
mllogger.event(key="trained_samples",
value=(args.consumed_train_samples - args.ext_lr_steps) * args.seq_length,
sync=False)
mllogger.event(key="train_samples",
value=(args.consumed_train_samples - args.ext_lr_steps) * args.seq_length,
sync=False)
mllogger.end(key=mllogger.constants.BLOCK_STOP,
metadata={'first_epoch_num': 0},
sync=False)
Expand Down Expand Up @@ -813,6 +819,9 @@ def train(forward_step_func, model, optimizer, opt_param_scheduler,
mllogger.event(key="trained_samples",
value=(args.consumed_train_samples - args.ext_lr_steps) * args.seq_length,
sync=False)
mllogger.event(key="train_samples",
value=(args.consumed_train_samples - args.ext_lr_steps) * args.seq_length,
sync=False)
if not saved_checkpoint:
save_checkpoint_and_time(iteration, model, optimizer,
opt_param_scheduler)
Expand Down
Loading