nvflare.app_common.aggregators.collect_and_assemble_aggregator module

class CollectAndAssembleAggregator(assembler_id: str)[source]

Bases: Aggregator

Perform collection and flexible assemble aggregation

This is used for methods needing a special assemble mechanism on the client submissions. It first collects all submissions from clients, then delegates the assembling functionality to assembler, which is specific to a particular algorithm. Note that the aggregation in this case is not in-time, since the assembling function may not be arithmetic mean.

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.

accept(shareable: Shareable, fl_ctx: FLContext) bool[source]

Accept the shareable submitted by the client.

  • shareable – submitted Shareable object

  • fl_ctx – FLContext


first boolean to indicate if the contribution has been accepted.

aggregate(fl_ctx: FLContext) Shareable[source]

Perform the aggregation for all the received Shareable from the clients.


fl_ctx – FLContext