An overview of FL client-side components
The architecture of an FL client as an agent was introduced in Chapter 3, Workings of the Federated Learning System. Here, we will introduce code that realizes the basic functionalities of an FL client. The client side of software architecture is simplified here, where only the client.py
file can be used in this example, together with supporting functions from the lib/util
folder, as shown in Figure 5.1:
Figure 5.1 – Python software components for an FL client as an agent
The following section gives a brief description of the Python files for an agent of the FL system.
Distributed agent-side code
For the agent side, there is one main file, client.py
, in the fl_main/agent
directory that deals with most of the FL client-side functionalities.
FL client code (client.py)
The client.py
file in the agent
folder has functions to participate in an FL cycle, an ML model exchange framework with an aggregator...