TensorPlay
latest (dev)
Copy
View Markdown

Latest development documentation · Updated 2026-10-08

CyclingIterator

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 calling iter on it again when it supports that) so per-epoch shuffling keeps working.

property epoch: int

Epoch number of the data currently being produced.

On this page

Ask DeepWiki