Skip to content

Commit 563429f

Browse files
authored
Add assert to catch case when neither epochs or iters is set (#1368)
1 parent 20379ad commit 563429f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

megatron/data/data_utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,11 @@ def validate_train_epochs(neox_args):
516516
def build_train_valid_test_data_loaders(neox_args):
517517
"""XXX"""
518518

519+
if not neox_args.train_epochs and not neox_args.train_iters:
520+
raise ValueError(
521+
"Must specify either train_epochs or train_iters"
522+
)
523+
519524
validate_train_epochs(neox_args)
520525

521526
(train_dataloader, valid_dataloader, test_dataloader) = (None, None, None)

0 commit comments

Comments
 (0)