nvflare.app_common.shareablegenerators.passthru module

class PassthroughShareableGenerator[source]

Bases: ShareableGenerator

Init FLComponent.

The FLComponent is the base class of all FL Components. (executors, controllers, responders, filters, aggregators, and widgets are all FLComponents)

FLComponents have the capability to handle and fire events and contain various methods for logging.

learnable_to_shareable(model: Learnable, fl_ctx: FLContext) Shareable[source]

Generate the initial Shareable from the Learnable object.

Parameters:
  • model – model object

  • fl_ctx – FLContext

Returns:

shareable

shareable_to_learnable(shareable: Shareable, fl_ctx: FLContext) Learnable[source]

Construct the Learnable object from Shareable.

Parameters:
  • shareable – shareable

  • fl_ctx – FLContext

Returns:

model object