nvflare.app_common.widgets.intime_model_selector module

class IntimeModelSelectionHandler(*args, **kwargs)[source]

Bases: IntimeModelSelector

Handler to determine if the model is globally best.

Parameters
  • weigh_by_local_iter (bool, optional) – whether the metrics should be weighted by trainer’s iteration number.

  • aggregation_weights (dict, optional) – a mapping of client name to float for aggregation. Defaults to None.

class IntimeModelSelector(weigh_by_local_iter=False, aggregation_weights=None)[source]

Bases: Widget

Handler to determine if the model is globally best.

Parameters
  • weigh_by_local_iter (bool, optional) – whether the metrics should be weighted by trainer’s iteration number.

  • aggregation_weights (dict, optional) – a mapping of client name to float for aggregation. Defaults to None.

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.