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.
Ancestors
Variables
- static
fields_dict : ClassVar[dict[str, marshmallow.fields.Field]]
- static
nested_fields : ClassVar[dict[str, collections.abc.Mapping[str, Any]]]
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.