nvflare.app_opt.sklearn.joblib_model_param_persistor module¶
- class JoblibModelParamPersistor(initial_params, save_name='model_param.joblib')[source]¶
Bases:
ModelPersistor
Persist global model parameters from a dict to a joblib file Note that this contains the necessary information to build a certain model but may not be directly loadable
- handle_event(event: str, fl_ctx: FLContext)[source]¶
Handles events.
- Parameters:
event_type (str) – event type fired by workflow.
fl_ctx (FLContext) – FLContext information.
- load_model(fl_ctx: FLContext) ModelLearnable [source]¶
Initialize and load the Model.
- Parameters:
fl_ctx – FLContext
- Returns:
ModelLearnable object
- save_model(model_learnable: ModelLearnable, fl_ctx: FLContext)[source]¶
Persists the Model object.
- Parameters:
model_learnable – ModelLearnable object
fl_ctx – FLContext