nvflare.app_opt.pt.file_model_locator module

class PTFileModelLocator(pt_persistor_id: str)[source]

Bases: ModelLocator

The ModelLocator’s job is to find and locate the models inventory saved during training.

Parameters:

pt_persistor_id (str) – ModelPersistor component ID

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

Returns the list of model names that should be included from server in cross site validation.add().

Parameters:

fl_ctx (FLContext) – FL Context object.

Returns:

List of model names.

Return type:

List[str]

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

Handles events.

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

  • fl_ctx (FLContext) – FLContext information.

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

Call to locate and load the model weights of model_name.

Parameters:
  • model_name – name of the model

  • fl_ctx – FLContext

Returns: model_weight DXO