Skip to content

Commit

Permalink
Add in_order support (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
mthrok authored Jan 17, 2025
1 parent 8173797 commit 3573933
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/spdl/dataloader/_pytorch_dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ def get_pytorch_dataloader(
prefetch_factor: int = 2,
persistent_workers: bool = False,
pin_memory_device: str | None = None,
in_order: bool = False,
) -> PyTorchDataLoader[U]:
from torch.utils.data.dataloader import IterableDataset

Expand Down Expand Up @@ -336,4 +337,5 @@ def get_pytorch_dataloader(
num_workers=num_workers,
timeout=timeout,
buffer_size=buffer_size,
output_order="input" if in_order else "completion",
)

0 comments on commit 3573933

Please sign in to comment.