distributed_sampler#

(s3prl.dataio.sampler.distributed_sampler)

Wrap any batch sampler for distributed training

Authors:
  • Leo 2022

DistributedBatchSamplerWrapper#

class s3prl.dataio.sampler.distributed_sampler.DistributedBatchSamplerWrapper(batch_sampler: BatchSampler, num_replicas: Optional[int] = None, rank: Optional[int] = None, allow_duplicates: bool = False, allow_uneven: bool = False)[source][source]#

Bases: object

set_epoch(epoch: int) None[source][source]#