nvflare.edge.executors.ete module¶
- class EdgeTaskExecutor(updater_id: str, update_timeout: float, learner_id='')[source]¶
Bases:
HierarchicalUpdateGathererThis is the base class for building executors to manage federated learning on edge devices. Subclasses must implement the required abstract methods defined here.
Note: This class is based on HUG (HierarchicalUpdateGatherer). All interactions with parent clients are already handled by HUG.
Constructor of EdgeTaskExecutor.
- Parameters:
updater_id – ID of the updater
update_timeout – timeout for update messages sent to parent
learner_id – ID of the learner component. Optional.
- abstract process_edge_result_report(request: ResultReport, current_task: TaskInfo, fl_ctx: FLContext) ResultResponse | None[source]¶
This is called to process an edge result report sent from the edge device.
- Parameters:
request – the request from edge device
current_task – the current pending task
fl_ctx – FLContext object
Returns: reply to the edge device
- abstract process_edge_selection_request(request: SelectionRequest, current_task: TaskInfo, fl_ctx: FLContext) SelectionResponse | None[source]¶
This is called to process an edge selection request sent from the edge device.
- Parameters:
request – the request from edge device
current_task – the current pending task
fl_ctx – FLContext object
Returns: reply to the edge device
- abstract process_edge_task_request(request: TaskRequest, current_task: TaskInfo, fl_ctx: FLContext) TaskResponse | None[source]¶
This is called to process an edge task request sent from the edge device.
- Parameters:
request – the request from edge device
current_task – the current pending task
fl_ctx – FLContext object
Returns: reply to the edge device