state_dict#

DataIterator.state_dict() → Dict[str, Any][source]#

Returns the state of the iterator.

This snapshot is useful upon restoration for resuming the dataset and iterator to the same state.

Returns:

A dictionary containing the state of the iterator.

Raises:

ValueError – If checkpointing is not enabled on this iterator.

Return type:

Dict[str, Any]

PublicAPI (alpha): This API is in alpha and may change before becoming stable.