Skip to content

Commit

Permalink
Adds more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bhimrazy committed Sep 5, 2024
1 parent 242a13c commit dff88ca
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/streaming/test_dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,5 +369,18 @@ def test_combined_dataset_dataloader_states(tmpdir):
assert dataloader.restore

# Verify remaining batches in the first epoch
count = 0
for _ in dataloader:
assert dataloader.current_epoch == 1, "Current epoch should be 1"
count += 1
assert count == 15, "There should be atleast 15 batches remaining in the first epoch"
assert not dataloader.restore

# Verify batches in the second epoch
count = 0
for _ in dataloader:
assert dataloader.current_epoch == 2, "Current epoch should be 2"
count += 1
assert count >= 25, "There should be at least 25 batches in the second epoch"

# TODO: Add more conditions to check the state of the dataloader

0 comments on commit dff88ca

Please sign in to comment.