nvflare.app_common.aggregators.model_aggregator module¶
- class ModelAggregator[source]¶
Bases:
AggregatorAbstract class for aggregating FLModels. Subclasses need to implement accept_model and aggregate_model methods.
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 accept_model(model: FLModel)[source]¶
needs to implement logic to accept a model, e.g. add to sum, count, etc.
- abstract aggregate_model() FLModel[source]¶
needs to implement aggregation logic and reset any internal stats