nvflare.app_common.state_persistors.storage_state_persistor module¶
- class StorageStatePersistor(storage: StorageSpec, uri_root: str)[source]¶
Bases:
StatePersistor
Creates a StorageStatePersistor.
- Parameters:
storage – StorageSpec object
uri_root – where to store the states.
- retrieve() FLSnapshot [source]¶
Call to load the persisted FL components snapshot from the persisted location.
- Returns:
retrieved Snapshot
- retrieve_run(job_id: str) RunSnapshot [source]¶
Call to load the persisted RunSnapshot of a job from the persisted location.
- Parameters:
job_id – job_id
- Returns:
RunSnapshot of the job_id
- save(snapshot: RunSnapshot) str [source]¶
Call to save the snapshot of the FL state to storage.
- Parameters:
snapshot – RunSnapshot object
- Returns:
storage location