spdl.source.SizedIterableWithShuffle

class SizedIterableWithShuffle[source]

Bases: SizedIterable[T], Protocol

A protocol that is often used to represent data source.

Methods

shuffle(seed)

Apply in-place shuffling.

shuffle(seed: int) None[source]

Apply in-place shuffling.

Note

The result of shuffle may not be observable until the iteration starts.