nvflare.edge.assessors.model_manager module¶
- class ModelManager[source]¶
Bases:
FLComponent,ABCAbstract base class for model managers in federated learning.
This class defines the interface that all model managers must implement. Model managers are responsible for handling model updates, aggregation, and version control in federated learning workflows.
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.
- abstract generate_new_model(fl_ctx: FLContext) None[source]¶
Generate a new model version based on accumulated updates.
- Parameters:
fl_ctx – FLContext object
Returns – none
- get_current_model(fl_ctx: FLContext) Any[source]¶
Get the current model.
- Parameters:
fl_ctx – FLContext object
- Returns:
The current model
- abstract initialize_model(model: Any, fl_ctx: FLContext) None[source]¶
Initialize the model manager with an initial model.
- Parameters:
model – The initial model
fl_ctx – FLContext object
Returns – none