nvflare.app_common.aggregators.assembler module

class Assembler(data_kind: str)[source]

Bases: FLComponent, ABC

Assembler class for aggregation functionality This defines the functionality of assembling the collected submissions for CollectAndAssembleAggragator

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 assemble(data: Dict[str, dict], fl_ctx: FLContext) DXO[source]

Assemble the collected submissions. This will be specified according to the specific algorithm E.g. global svm round on the collected local supporting vectors; global k-means step on the local centroids and counts

Returns:

A DXO containing all information ready to be returned to clients

property collection
get_expected_data_kind()[source]
abstract get_model_params(dxo: DXO) dict[source]

Connects the assembler’s _collection with CollectAndAssembleAggregator Get the collected parameters from the main aggregator :returns: A dict of parameters needed for further assembling

initialize(fl_ctx: FLContext)[source]
reset() None[source]