Skip to content

Commit

Permalink
run black
Browse files Browse the repository at this point in the history
  • Loading branch information
ramanishsingh committed Aug 21, 2024
1 parent 6c6ef78 commit b6c71d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/stateful_dataloader/test_dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -1995,7 +1995,7 @@ def test_load_state_dict(self):

def test_next_yielded(self):
from torchdata.stateful_dataloader.sampler import StatefulDistributedSampler

sampler = StatefulDistributedSampler(self.dataset, num_replicas=2, rank=0, shuffle=True, seed=42)
iterator = iter(sampler)
next(iterator) # advance the iterator
Expand Down Expand Up @@ -2065,7 +2065,7 @@ def test_no_data_loss_with_drop_last(self):

sampler = StatefulDistributedSampler(self.dataset, num_replicas=3, rank=0, drop_last=True)
indices = list(iter(sampler))
expected_length = (len(self.dataset) // 3) * 3 // 3
expected_length = (len(self.dataset) // 3) * 3 // 3
self.assertEqual(
len(indices), expected_length, "Length of indices should match expected length with drop_last=True"
)
Expand Down

0 comments on commit b6c71d8

Please sign in to comment.