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

[very simple change] Remove duplicated code #765

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion megatron/core/transformer/transformer_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ class TransformerConfig(ModelParallelConfig):
# activation recomputation
####################
recompute_granularity: str = None
recompute_granularity: str = None
"""Determines which type of activation recompute to use. Megatron-core supports 'selective'
activation checkpointing where only the memory intensive part of attention is checkpointed.
These memory intensive activations are also less compute intensive which makes activation
Expand Down
5 changes: 1 addition & 4 deletions megatron/training/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def pretrain(train_valid_test_dataset_provider,
1) initialize Megatron.
2) setup model, optimizer and lr schedule using the model_provider.
3) call train_val_test_data_provider to get train/val/test datasets.
4) train the modle using the forward_step_func.
4) train the model using the forward_step_func.

Args:
train_valid_test_dataset_provider: a function that takes the size of
Expand Down Expand Up @@ -211,9 +211,6 @@ def pretrain(train_valid_test_dataset_provider,
time.time() - _TRAIN_START_TIME))
print_datetime('after megatron is initialized')

args = get_args()
timers = get_timers()

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one_logger = get_one_logger()
if one_logger:
one_logger.log_metrics({
Expand Down