nvflare.widgets.widget module

class Widget[source]

Bases: FLComponent

Pre-defined components that address specific needs.

Some examples of such needs:
  • report current status

  • dynamically change its tunable parameters

  • record processing errors

  • stats recording

Each widget is a singleton object that is registered with the Engine with a unique ID.

All built-in widget IDs are documented in the WidgetID class.

Init the Widget.

class WidgetID(value)[source]

Bases: str, Enum

An enumeration.

COMPONENT_CALLER = 'component_caller'
FED_EVENT_RUNNER = 'fed_event_runner'
INFO_COLLECTOR = 'info_collector'