evaluate
Algorithm to evaluate a model on remote data.
Classes
ModelEvaluation
class ModelEvaluation( *, model: _DistributedModelTypeOrReference, pretrained_file: Optional[Union[str, os.PathLike]] = None, project_id: Optional[str] = None,):
Algorithm for evaluating a model and returning metrics.
note
The metrics cannot currently be specified by the user.
Arguments
model
: The model to evaluate on remote data.pretrained_file
: A file path or a string containing a pre-trained model. Defaults to None.
Attributes
class_name
: The name of the algorithm class.fields_dict
: A dictionary mapping all attributes that will be serialized in the class to their marshamllow field type. (e.g. fields_dict ={"class_name": fields.Str()}
).model
: The model to evaluate on remote data.nested_fields
: A dictionary mapping all nested attributes to a registry that contains class names mapped to the respective classes. (e.g. nested_fields ={"datastructure": datastructure.registry}
)pretrained_file
: A file path or a string containing a pre-trained model. Defaults to None.
Ancestors
- bitfount.federated.algorithms.model_algorithms.base._BaseModelAlgorithmFactory
- BaseAlgorithmFactory
- abc.ABC
- bitfount.federated.roles._RolesMixIn
- bitfount.types._BaseSerializableObjectMixIn
Methods
create
def create(self, role: Union[str, Role], **kwargs: Any) ‑> Any:
Create an instance representing the role specified.
modeller
def modeller( self, **kwargs: Any,) ‑> bitfount.federated.algorithms.model_algorithms.evaluate._ModellerSide:
Returns the modeller side of the ModelEvaluation algorithm.
worker
def worker( self, hub: BitfountHub, **kwargs: Any,) ‑> bitfount.federated.algorithms.model_algorithms.evaluate._WorkerSide:
Returns the worker side of the ModelEvaluation algorithm.
Arguments
hub
:BitfountHub
object to use for communication with the hub.- **
**kwargs
**: Additional keyword arguments.
Returns The worker side of the ModelEvaluation algorithm.