nvflare.app_opt.xgboost.histogram_based_v2.adaptor_executor module

class XGBExecutor(adaptor_component_id: str, configure_task_name='config', start_task_name='start')[source]

Bases: Executor

Executor for XGB.

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

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) XGBClientAdaptor[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:

An XGBClientAdaptor object

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.