Enumeration classes for implementing the FL system
Enumeration classes are for assisting implemention of the FL system. They are defined in the states.py
file found in the lib/util
folder of the fl_main
directory. Let us look into what libraries are imported to define the enumeration classes.
Importing libraries to define the enumeration classes
In this states.py
code example, the file imports general libraries such as Enum
and IntEnum
from enum
:
from enum import Enum, IntEnum
Next, we’ll explain the class that defines the prefixes of three components of the FL system.
IDPrefix defining the FL system components
The following is a list of classes to define the FL system components. IDPrefix
is the prefix to indicate which FL component is referred to in the code, such as agent
, aggregator
, or database
:
class IDPrefix: agent = 'agent' aggregator = 'aggregator' db = ...