latest (dev)
Copy
Latest development documentation · Updated 2026-10-08
tensorplay.distributed.elastic.utils.data API
Classes 2
CyclingIterator
classFull reference ↗- class tensorplay.distributed.elastic.utils.data.CyclingIterator(*args, start_epoch: int = 0, n: int | None = None, generator_fn=None)[source]
Wrap a finite iterable into an endless one.
Each cycle increments
epoch; the underlying iterable is re-materialized through its factory (or by callingiteron it again when it supports that) so per-epoch shuffling keeps working.- property epoch: int
Epoch number of the data currently being produced.
ElasticDistributedSampler
classFull reference ↗- class tensorplay.distributed.elastic.utils.data.ElasticDistributedSampler(dataset, *, start_rank: int = 0, start_epoch: int = 0)[source]
Sampler for elastic jobs where
num_replicasmay 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.
Help improve this page
Found an error, an unclear step, or a missing example?
tensorplay.distributed.elastic.utils API
Complete API reference for tensorplay.distributed.elastic.utils, including signatures, parameters, examples and members.
tensorplay.distributed.fsdp API
Complete API reference for tensorplay.distributed.fsdp, including signatures, parameters, examples and members.

