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 marshamllow 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
- bitfount.federated.aggregators.base._BaseAggregatorFactory
- bitfount.federated.aggregators.base._AggregatorWorkerFactory
- abc.ABC
- bitfount.types._BaseSerializableObjectMixIn
- bitfount.federated.roles._RolesMixIn
Variables
- static
fields_dict : ClassVar[dict[str, marshmallow.fields.Field]]
- static
nested_fields : ClassVar[dict[str, collections.abc.Mapping[str, Any]]]
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.aggregators.aggregator._ModellerSide:
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.