nvflare.app_common.abstract.model_locator module

class ModelLocator[source]

Bases: FLComponent

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.

get_model_names(fl_ctx: FLContext) List[str][source]

List the name of the models.

Parameters:

fl_ctx (FLContext) – FL Context object

Returns:

List of names for models

Return type:

List[str]

locate_model(model_name, fl_ctx: FLContext) DXO[source]

Locate a single model by its name.

Parameters:
  • model_name (str) – Name of the model.

  • fl_ctx (FLContext) – FL Context object.

Returns:

a DXO object

Return type:

DXO