Skip to content

Commit

Permalink
Sanity Check via a second condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Helw150 committed Jan 30, 2025
1 parent 4fb5cd7 commit bbec00b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_mixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,20 @@ async def test_mixture_dataset_simulated_data_size():
assert len(batch) == 3
assert all(item in [1, 10, 100] for item in batch)

mixture_ds = MixtureDataset(
datasets(),
weights,
block_size=10,
key=key(),
randomize_blocks=False,
stop_strategy=StopStrategy.RESTART_STRATEGY,
simulated_data_ratio=0.4,
)
for _ in range(10):
batch = await mixture_ds.get_batch([0, 1, 2])
assert len(batch) == 3
assert all(item in [1, 2, 10, 20, 100, 200] for item in batch)


@pytest.mark.asyncio
async def test_mixture_dataset_normalized_weights():
Expand Down

0 comments on commit bbec00b

Please sign in to comment.