nvflare.components.handlers package

Submodules

nvflare.components.handlers.fl_context_info_handler module

class FLContextInfoHandler

Bases: nvflare.apis.fl_component.FLComponent

handle_event(event_type: str, fl_ctx: nvflare.apis.fl_context.FLContext)

perform the handler process based on the event_type.

Parameters
  • event_type (str) – event type delivered from workflow

  • fl_ctx (FLContext) – FL context, including peer context and other information

Returns:

nvflare.components.handlers.intime_model_selection_handler module

class IntimeModelSelectionHandler(weigh_by_local_iter=False, aggregation_weights=None)

Bases: nvflare.apis.fl_component.FLComponent

Parameters
  • weigh_by_local_iter – default False

  • validation_metric_name – meta data name used for model selection

handle_event(event_type: str, fl_ctx: nvflare.apis.fl_context.FLContext)

perform the handler process based on the event_type.

Parameters
  • event_type (str) – event type delivered from workflow

  • fl_ctx (FLContext) – FL context, including peer context and other information

Returns:

Module contents