Skip to content

Commit

Permalink
Fix MLM datasets length
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasw21 committed Jun 27, 2022
1 parent c71b379 commit 9da7588
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion megatron/data/mlm_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def __init__(
assert self.inputs_length + self.targets_length == args.seq_length

def __len__(self):
return len(self.samples_mapping)
return len(self._gpt_dataset)

def __getitem__(self, idx):
if isinstance(idx, slice):
Expand Down

0 comments on commit 9da7588

Please sign in to comment.