Designing FL client libraries
In this section, we will explain how to package essential functions to be provided as libraries to users. In this example, the simplest way to package them as libraries will be discussed. This will need to be expanded, depending on your needs and the design of your own FL client framework. By packaging FL client-side modules as libraries, developers will be easily able to integrate the FL client’s functions into the local ML engine.
Let’s start with how to define a library to start and register an FL client.
Starting FL client core threads
For local ML application developers to be able to integrate FL client-related functions, they sometimes need to be packaged as threading functions.
The following code to register an agent in the FL system simply puts a participate
function into the run_until_complete
function of an asyncio.get_event_loop
function:
def register_client(self): Â Â Â Â asyncio.get_event_loop(...