espnet2.sds.end_to_end.mini_omni.litgpt.utils.CycleIterator
Less than 1 minute
espnet2.sds.end_to_end.mini_omni.litgpt.utils.CycleIterator
class espnet2.sds.end_to_end.mini_omni.litgpt.utils.CycleIterator(iterable: Iterable)
Bases: object
An iterator that cycles through an iterable indefinitely.
Example
>>> iterator = CycleIterator([1, 2, 3])
>>> [next(iterator) for _ in range(5)]
[1, 2, 3, 1, 2]NOTE
Unlike itertools.cycle, this iterator does not cache the values of the iterable.
