fl4health.parameter_exchange.packing_exchanger module

class FullParameterExchangerWithPacking(parameter_packer)[source]

Bases: FullParameterExchanger, Generic[T]

__init__(parameter_packer)[source]

Parameter exchanger for when sending the entire set of model weights between the client and server with potential side information packed in as well.

Parameters:

parameter_packer (ParameterPacker[T]) – Parameter packer used to pack and unpack auxiliary information alongside the model weights.

pack_parameters(model_weights, additional_parameters)[source]
Return type:

list[ndarray[Any, dtype[Any]]]

unpack_parameters(packed_parameters)[source]
Return type:

tuple[list[ndarray[Any, dtype[Any]]], TypeVar(T)]