Skip to content

Commit

Permalink
enforce DropLast for the distributed sampler to work around set issues
Browse files Browse the repository at this point in the history
  • Loading branch information
PicoCreator committed Feb 6, 2024
1 parent e02907a commit bea9014
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions RWKV-v5/src/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1603,6 +1603,8 @@ def train_dataloader(self):
shuffle=self.dataloader_shuffle_training and not self.sort_by_length,
num_replicas=self.trainer.world_size,
rank=self.trainer.global_rank,
## This is required due to multi node alignment errors
drop_last=True
)

microbatch_size = 1
Expand Down Expand Up @@ -1638,6 +1640,8 @@ def val_dataloader(self):
shuffle=False,
num_replicas=self.trainer.world_size,
rank=self.trainer.global_rank,
## This is required due to multi node alignment errors
drop_last=True
)

microbatch_size = 1
Expand Down

0 comments on commit bea9014

Please sign in to comment.