nvflare.app_common.abstract.model_persistor module¶
- class ModelPersistor[source]¶
Bases:
LearnablePersistor
,ABC
Init FLComponent.
The FLComponent is the base class of all FL Components. (executors, controllers, responders, filters, aggregators, and widgets are all FLComponents)
FLComponents have the capability to handle and fire events and contain various methods for logging.
- get_model_inventory(fl_ctx: FLContext) {<class 'str'>: <class 'nvflare.app_common.model_desc.ModelDescriptor'>} [source]¶
Get the model inventory of the ModelPersister.
- Parameters
fl_ctx – FLContext
Returns: { model_kind: ModelDescriptor }
- load(fl_ctx: FLContext)[source]¶
Load the Learnable object.
- Parameters
fl_ctx – FLContext
- Returns
Learnable object loaded
- abstract load_model(fl_ctx: FLContext) Learnable [source]¶
Initialize and load the model.
- Parameters
fl_ctx – FLContext
- Returns
Model object