nvflare.apis.state_persistor module¶
- class StatePersistor[source]¶
Bases:
ABC
- abstract retrieve() FLSnapshot [source]¶
Loads the persisted FL components snapshot from the persisted location.
- Returns:
An FLSnapshot
- abstract retrieve_run(job_id: str) RunSnapshot [source]¶
Loads the persisted RunSnapshot of a job_id from the persisted location.
- Parameters:
job_id – job_id
- Returns:
A RunSnapshot of the job_id
- abstract save(snapshot: RunSnapshot) str [source]¶
Saves the snapshot of the FL state to storage.
- Parameters:
snapshot – RunSnapshot object
- Returns:
Storage location.