Model Data Connectors Factory#

The base factory class that allows for creation of the model data connector.

class fma_core.workflows.model_data_connectors_factory.BaseModelDataConnector(settings: Dict)#

Bases: ABC

The metadata connector object used for connection to FMA setup.

Initialization function for the model data connector.

Parameters:

settings (Dict) – The settings that will be used to initialize the model data connector

classmethod create(model_connector_type: str, model_connector_settings: Optional[Dict] = None) ClassVar#

Creates subclass of aggregation connector.

Parameters:
  • model_connector_type (str) – The subclass of model data connector to be created

  • model_connector_settings (Dict, optional) – The settings to initialize the connector, defaults to None

Raises:

ValueError – meta_connector_type not in BaseMetadataConnector subclass

Returns:

A valid subclass object of BaseModelDataConnector

Return type:

ClassVar

abstract push_model_data_to_storage(model_data: Any)#

Pushes model data associated with the metadata of a model.

Parameters:

model_data (Any) – An object containing model data associated with the metadata of a model

Raises:

NotImplementedError – method to be implemented in subclass

abstract pull_model_updates_data(model_updates: Any) Any#

Pull Model weights that have been pushed by the clients as model updates.

Parameters:

model_updates (Any) – A list of model updates

Raises:

NotImplementedError – method to be implemented in subclass

abstract prep_model_data_for_storage(data: Any) Any#

Preps data created by aggregate by service to be stored in the model data.

Parameters:

data (Any) – The data that needs to be prepped for storage

Raises:

NotImplementedError – method to be implemented in subclass