TensorPlay
latest (dev)
Copy
View Markdown

Latest development documentation · Updated 2026-10-08

ElasticDistributedSampler

class tensorplay.distributed.elastic.utils.data.ElasticDistributedSampler(dataset, *, start_rank: int = 0, start_epoch: int = 0)[source]

Sampler for elastic jobs where num_replicas may change per epoch.

Unlike a fixed-shard distributed sampler, this one derives the covered range from the epoch number so restarting with a different world size never skips or repeats data beyond the wrap-around tail.

On this page

Ask DeepWiki