nvflare.app_common.abstract.model_learner module¶
- class ModelLearner[source]¶
Bases:
FLComponentWrapper
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.
- STATE = None¶
- configure(model: FLModel)[source]¶
Called by the framework to configure the Learner with the config info in the model
- Parameters:
model – the object that contains config parameters
Returns: None
- get_model(model_name: str) str | FLModel [source]¶
Called by the framework to return the trained model from the Learner.
- Parameters:
model_name – type of the model for validation
Returns: trained model; or return code if failed