cerebras.modelzoo.common.pytorch_utils.IterableDatasetSampler#

class cerebras.modelzoo.common.pytorch_utils.IterableDatasetSampler(*args, **kwargs)[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