fedn.utils.helpers package
The helpers package is responsible for serialization/deserialization and numerics operations for various machine learning frameworks.
Subpackages
Submodules
fedn.utils.helpers.helperbase module
- class fedn.utils.helpers.helperbase.HelperBase[source]
Bases:
ABC
Abstract class defining helpers.
- abstract increment_average(m1, m2, a, W)[source]
Compute one increment of incremental weighted averaging.
- Parameters:
m1 – Current model weights in array-like format.
m2 – New model weights in array-like format.
a – Number of examples in new model.
W – Total number of examples.
- Returns:
Incremental weighted average of model weights.
fedn.utils.helpers.helpers module
- fedn.utils.helpers.helpers.get_helper(helper_module_name)[source]
Return an instance of the helper class.
- Parameters:
helper_module_name (str) – The name of the helper plugin module.
- Returns:
A helper instance.
- Return type:
class: fedn.utils.helpers.helpers.HelperBase