nvflare.app_opt.flower.executor module
- class FlowerExecutor(start_task_name='start', configure_task_name='config', per_msg_timeout=10.0, tx_timeout=100.0, client_shutdown_timeout=5.0, extra_env: dict | None = None, allow_runtime_dependency_installation: bool = False)[source]
Bases:
TieExecutorFlowerExecutor constructor
- Parameters:
start_task_name – name of the “start” task
configure_task_name – name of the “config” task
per_msg_timeout – per-msg timeout for ReliableMessage
tx_timeout – transaction timeout for ReliableMessage
client_shutdown_timeout – how long to wait for graceful shutdown of the client
extra_env – extra env variables to be passed to client applet
allow_runtime_dependency_installation – whether to allow dynamic dependency installation (only flwr>=1.29)
- configure(config: dict, fl_ctx: FLContext)[source]
Called by the TieExecutor to configure the executor based on the config params received from the server. A subclass of TieExecutor should implement this method.
- Parameters:
config – the config data
fl_ctx – FL context
Returns: None
- get_applet(fl_ctx: FLContext)[source]
Called by the TieExecutor to get the Applet to be used by this executor. A subclass of TieExecutor must implement this method.
- Parameters:
fl_ctx – the FL context
Returns: an Applet object
- get_connector(fl_ctx: FLContext)[source]
Called by the TieExecutor to get the Connector to be used by this executor. A subclass of TieExecutor must implement this method.
- Parameters:
fl_ctx – the FL context
Returns: a Connector object
- get_connector_config(fl_ctx: FLContext) dict[source]
Called by the TieExecutor to get config params for the connector. A subclass of TieExecutor should implement this method. Note that this method is always called after the “configure” method, hence it’s possible to dynamically determine the connector’s config based on the config params in the “configure” step.
- Parameters:
fl_ctx – the FL context
Returns: a dict of config params