Note: This API is new and only available via
pip install tensorflow-federated-nightly.
An interface for saving and loading program state in a federated program.
is used to implement fault tolerance in a
federated program. The structure or type of the program state that is saved is
unknown at construction time and can change as the program runs.
) -> Any
Returns the saved program state for the given
A integer representing the version of a saved program state.
If there is no program state for
load_latest() -> Optional[Tuple[Any, int]]
Returns the latest saved program state and version or (
A tuple of the latest saved (program state, version) or (
None, 0) if
there is no latest saved program state.
program_state for the given
The program state to save.
A strictly increasing integer representing the version of a saved
If there is already program
state for the given
versions() -> Optional[List[int]]
Returns a list of saved versions or
A list of saved versions or
None if there is no saved program state.