nvflare.app_common.ccwf.client_controller_executor module¶
- class ClientControllerExecutor(controller_id_list: List, task_name_prefix: str = '', persistor_id='persistor', final_result_ack_timeout=10, max_task_timeout: int = 3600)[source]¶
Bases:
Executor
ClientControllerExecutor for running controllers on client-side using WFCommClient.
- Parameters:
controller_id_list – List of controller ids, used in order.
task_name_prefix – prefix of task names. All CCWF task names are prefixed with this.
persistor_id – ID of the persistor component
final_result_ack_timeout – timeout for sending final result to participating clients
max_task_timeout – Maximum task timeout for Controllers using WFCommClient when task.timeout is set to 0. Defaults to 3600.
- execute(task_name: str, shareable: Shareable, fl_ctx: FLContext, abort_signal: Signal) Shareable [source]¶
Executes a task.
- Parameters:
task_name (str) – task name.
shareable (Shareable) – input shareable.
fl_ctx (FLContext) – fl context.
abort_signal (Signal) – signal to check during execution to determine whether this task is aborted.
- Returns:
An output shareable.
- finalize(fl_ctx: FLContext)[source]¶
Called to finalize the executor. :param fl_ctx: the FL Context
Returns: None
- get_config_prop(name: str, default=None)[source]¶
Get a specified config property. :param name: name of the property :param default: default value to return if the property is not defined.
Returns:
- handle_event(event_type: str, fl_ctx: FLContext)[source]¶
Handles events.
- Parameters:
event_type (str) – event type fired by workflow.
fl_ctx (FLContext) – FLContext information.
- initialize(fl_ctx: FLContext)[source]¶
Called to initialize the executor. :param fl_ctx: The FL Context
Returns: None