Skip to main content

aggregator

Vanilla model parameter aggregators for Federated Averaging.

Classes​

Aggregator​

class Aggregator():

Vanilla model parameter aggregator for Federated Averaging.

Performs simple arithmetic mean of unencrypted model parameters.

danger

This aggregator is not secure. Algorithm outputs are shared with participants in an unencrypted manner. It is not recommended to use this aggregator in a zero-trust setting.

Attributes

  • class_names: The name of the aggregator class.
  • fields_dict: A dictionary mapping all attributes that will be serialized in the class to their marshmallow field type. (e.g. fields_dict = {"class_name": fields.Str()}).
  • name: The name of the aggregator.
  • 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})

Ancestors​

Variables​

Methods​


create​

def create(self, role: str | Role, **kwargs: Any) ‑> Any:

Create an instance representing the role specified.

modeller​

def modeller(    self, **kwargs: Any,) ‑> bitfount.federated.aggregators.aggregator._ModellerSide[typing.Any]:

Returns the modeller side of the Aggregator.

worker​

def worker(self, **kwargs: Any) ‑> bitfount.federated.aggregators.aggregator._WorkerSide:

Returns the worker side of the Aggregator.