nvflare.app_common.np.np_trainer module

class NPTrainer(delta=1, sleep_time=0, train_task_name='train', submit_model_task_name='submit_model', model_name='best_numpy.npy', model_dir='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.

execute(task_name: str, shareable: Shareable, fl_ctx: FLContext, abort_signal: Signal) Shareable[source]
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.