Skip to content

Commit

Permalink
pyright
Browse files Browse the repository at this point in the history
  • Loading branch information
dakinggg committed Jun 13, 2024
1 parent 1063a5d commit 0285503
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/data/test_packing.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from llmfoundry.data.finetuning.dataloader import build_finetuning_dataloader
from llmfoundry.data.packing import BinPackCollator, auto_packing_ratio
from llmfoundry.utils.builders import build_tokenizer
from llmfoundry.data.finetuning.tasks import StreamingFinetuningDataset


def _data_to_batch(data: List[List[int]], max_seq_len: int,
Expand Down Expand Up @@ -205,7 +206,9 @@ def test_auto_packing_with_streaming_dataloader(tmp_path: Path):
batch_ix += 1
if batch_ix >= 3:
break


assert isinstance(loader, DataLoader)
assert isinstance(loader.dataset, StreamingFinetuningDataset)
assert loader.dataset.packing_ratio is not None
assert loader.dataset.packing_ratio == int(loader.batch_size / 6)

Expand Down

0 comments on commit 0285503

Please sign in to comment.