cerebras.modelzoo.common.pytorch_utils.IterableDatasetSampler#
- class cerebras.modelzoo.common.pytorch_utils.IterableDatasetSampler[source]#
Bases:
torch.utils.data.IterableDataset
This sampler can be used with a multi-worker distributed dataloader. All workers on all nodes get a copy of the IterableDataset but only yield samples according to the world size and their rank.
Methods
- __call__(*args: Any, **kwargs: Any) Any #
Call self as a function.
- static __new__(cls, *args: Any, **kwargs: Any) Any #