Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 10, 2024
1 parent 22c5dca commit 7f921f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/streaming/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -982,8 +982,8 @@ def test_replay_chunks_sampling():
assert _replay_chunks_sampling(workers_intervals, {0: 15, 1: 12}) == ({0: 3, 1: 2}, {0: 0, 1: 2})

# Test that replay stops at the right chunk
workers_intervals={0: [(0, 0, 10, 10), (10, 10, 20, 20), (20, 20, 21, 21), (21, 21, 30, 30)]}
indexes={0: 15}
workers_intervals = {0: [(0, 0, 10, 10), (10, 10, 20, 20), (20, 20, 21, 21), (21, 21, 30, 30)]}
indexes = {0: 15}
# Replay should stop at chunk index 1, because 15 - 10 = 5, which fits into with chunk idx 1
chunk_indexes, indexes = _replay_chunks_sampling(workers_intervals, indexes)
assert chunk_indexes == {0: 1}
Expand Down

0 comments on commit 7f921f8

Please sign in to comment.