nvflare.app_opt.flower.connectors.flower_connector module¶
- class FlowerClientConnector(per_msg_timeout: float, tx_timeout: float)[source]¶
Bases:
Connector
FlowerClientConnector defines commonly required methods for client connector implementations.
Constructor of FlowerClientConnector
- Parameters:
per_msg_timeout – per-msg timeout to be used when sending request to server via ReliableMessage
tx_timeout – tx timeout to be used when sending request to server via ReliableMessage
- class FlowerServerConnector[source]¶
Bases:
Connector
FlowerServerConnector specifies commonly required methods for server connector implementations.
Constructor of Connector
- configure(config: dict, fl_ctx: FLContext)[source]¶
Called by Flower Controller to configure the site.
- Parameters:
config – config data
fl_ctx – FL context
Returns: None
- process_app_request(op: str, request: Shareable, fl_ctx: FLContext, abort_signal: Signal) Shareable [source]¶
This method is called by the FL Server when the request is received from a FL client.
- Parameters:
op – the op code of the request.
request – the request received from FL client
fl_ctx – FL context
abort_signal – abort signal that could be triggered during the process
Returns: response from the Flower server converted to Shareable
- abstract send_request_to_flower(request: Shareable, fl_ctx: FLContext) Shareable [source]¶
Send request to the Flower server. Subclass must implement this method to send this request to the Flower server.
- Parameters:
request – the request received from FL client
fl_ctx – the FL context
Returns: reply from the Flower server converted to Shareable