nvflare.app_opt.xgboost.histogram_based_v2.executor module¶
- class XGBExecutor(adaptor_component_id: str, configure_task_name='config', start_task_name='start', per_msg_timeout=10.0, tx_timeout=100.0)[source]¶
Bases:
Executor
Constructor
- Parameters:
adaptor_component_id – the component ID of client target adaptor
configure_task_name – name of the config task
start_task_name – name of the start task
per_msg_timeout – timeout for sending one message
tx_timeout – transaction timeout
- 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.
- get_adaptor(fl_ctx: FLContext)[source]¶
Get adaptor to be used by this executor. This is the default implementation that gets the adaptor based on configured adaptor_component_id. A subclass of XGBExecutor may get adaptor in a different way.
- Parameters:
fl_ctx – the FL context
Returns: a XGBClientAdaptor object