nvflare.app_common.executors.in_process_client_api_executor module¶
- class InProcessClientAPIExecutor(task_script_path: str, task_script_args: str = '', task_wait_time: float | None = None, result_pull_interval: float = 0.5, log_pull_interval: float | None = None, params_exchange_format: str = 'numpy', params_transfer_type: TransferType = 'FULL', from_nvflare_converter_id: str | None = None, to_nvflare_converter_id: str | None = None, train_with_evaluation: bool = False, train_task_name: str = 'train', evaluate_task_name: str = 'validate', submit_model_task_name: str = 'submit_model')[source]¶
Bases:
Executor
Init 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.
Checks output shareable after execute.
- 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.