Skip to main content

base

Base classes for all model-based algorithms.

Attributes: registry: A read-only dictionary of model algorithm factory names to their implementation classes.

Classes

BaseModelAlgorithmFactory

class BaseModelAlgorithmFactory(    *,    model: MODEL_TR,    pretrained_file: Optional[Union[str, os.PathLike]] = None,    project_id: Optional[str] = None,):

Base factory for algorithms involving an underlying model.

Arguments

  • model: The model for the federated algorithm.
  • pretrained_file: A file path or a string containing a pre-trained model. Defaults to None.

Attributes

  • model: The model for the federated algorithm.
  • pretrained_file: A file path or a string containing a pre-trained model. Defaults to None.

Variables

Methods


modeller

def modeller(self, *, context: ProtocolContext, **kwargs: Any)> ~T_ModellerSide:

Modeller-side of the algorithm.

worker

def worker(    self, *, hub: BitfountHub, context: ProtocolContext, **kwargs: Any,)> collections.abc.Callable[..., ~T_WorkerSide]:

Worker-side of the algorithm.