-
Book Overview & Buying
-
Table Of Contents
Federated Learning with Python
By :
The data structure handler is implemented in the data_struc.py file, which can be found in the lib/util folder of the fl_main directory. The data structure class has the LimitedDict class to handle the aggregation of the ML models in a consistent manner.
In this data_struc.py code example, the handler imports general libraries, such as numpy and Dict:
from typing import Dict import numpy as np
Next, let’s move on to the LimitedDict class and its functions related to the data structure handler.
The following is a definition of the LimitedDict class and its functions related to the data structure handler.
The functions of the LimitedDict class are for converting a dictionary format into a class with keys and values. LimitedDict is used with the buffer in ML models to store local and cluster models...