modelzoo.common.pytorch.utils.IterableDatasetSampler#

class 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.

__init__(iterable_dataset, world_size=1, rank=0)[source]#
static __new__(cls, *args: Any, **kwargs: Any) Any#