Unverified Commit 021db112 by Shawn/Yuxuan Tong Committed by GitHub

[Fix] No Shuffling for `val_dataloader` (#423)

Validation should not have shuffling.
parent 6e4a445f
...@@ -167,7 +167,7 @@ class FSDPSFTTrainer(object): ...@@ -167,7 +167,7 @@ class FSDPSFTTrainer(object):
drop_last=True) drop_last=True)
self.val_sampler = DistributedSampler(self.val_dataset, self.val_sampler = DistributedSampler(self.val_dataset,
shuffle=True, shuffle=False,
num_replicas=world_size, num_replicas=world_size,
rank=rank, rank=rank,
drop_last=True) drop_last=True)
......
...@@ -523,7 +523,7 @@ class RayPPOTrainer(object): ...@@ -523,7 +523,7 @@ class RayPPOTrainer(object):
# Validation datasets are sent to inference engines as a whole batch, # Validation datasets are sent to inference engines as a whole batch,
# which will schedule the memory themselves. # which will schedule the memory themselves.
batch_size=len(self.val_dataset), batch_size=len(self.val_dataset),
shuffle=True, shuffle=False,
drop_last=False, drop_last=False,
collate_fn=collate_fn) collate_fn=collate_fn)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment