nvflare.app_common.ccwf.comps.simple_intime_model_selector module

class SimpleIntimeModelSelector(weigh_by_local_iter=False, aggregation_weights=None, validation_metric_name='initial_metrics')[source]

Bases: Widget

Handler to determine if the model is globally best.

  • 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.

  • validation_metric_name (str, optional) – key used to save initial validation metric in the DXO meta properties (defaults to MetaKey.INITIAL_METRICS).

handle_event(event_type: str, fl_ctx: FLContext)[source]

Handles events.

  • event_type (str) – event type fired by workflow.

  • fl_ctx (FLContext) – FLContext information.