nvflare.edge.updaters.emd module¶
- class AggregatorFactory[source]¶
Bases:
ABC- abstract get_aggregator() Aggregator[source]¶
- class EdgeModelUpdater(aggr_factory_id: str | AggregatorFactory, max_model_versions: int)[source]¶
Bases:
UpdaterInit 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.
- end_task(fl_ctx: FLContext)[source]¶
This is called by HUG at the end of the task.
- Parameters:
fl_ctx – FLContext object
Returns: None
- prepare_update_for_parent(fl_ctx: FLContext) Shareable | None[source]¶
This is called by HUG to prepare update report to be sent to the parent.
- Parameters:
fl_ctx – FLContext object
Returns: a Shareable object for the update report; or None if no update
- process_child_update(update: ~nvflare.apis.shareable.Shareable, fl_ctx: ~nvflare.apis.fl_context.FLContext) -> (<class 'bool'>, typing.Optional[nvflare.apis.shareable.Shareable])[source]¶
This is called by HUG to process an update report from a child.
- Parameters:
update – the update report from the child
fl_ctx – FLContext object
Returns: a tuple of (whether the update is accepted, reply to the child)
- process_parent_update_reply(reply: Shareable, fl_ctx: FLContext)[source]¶
This is called by HUG to process the reply received from the parent for the update report sent to it. The reply typically contains information for how to update the current state of this Updater.
- Parameters:
reply – the reply from the parent
fl_ctx – FLContext object
Returns: None