nvflare.fuel.utils.attributes_exportable module

class AttributesExportable[source]

Bases: ABC

Export attributes.

abstract export(export_mode: str) Tuple[str, dict][source]

Exports attributes.

Parameters:

export_mode (str) – export to peer (ExportMode.PEER) or to self (ExportMode.SELF).

Returns:

A tuple of (export section name, arguments to be exported)

class ExportMode[source]

Bases: object

PEER = 'PEER'
SELF = 'SELF'
export_components(components: Dict[str, AttributesExportable], reserved_keys: List[str], export_mode: str) dict[source]

Exports components.

Parameters:
  • components – A dict of {component_id: AttributesExportable}

  • reserved_keys – keys that are reserved for system purpose.

  • export_mode (str) – export to peer (ExportMode.PEER) or to self (ExportMode.SELF).