# collect data
def process(self, dict_data, handler)
# start server
def start(self)
Define your own Server, inherit FlGrpcServer, implement the functions define in Grpc
from Common.Server.fl_grpc_server import FlGrpcServer
class yourServer(FLGrpcServer):
# implement your func.
def yourfunc(self, request, context):
pass
implememt your hander
# define interface
class YourHandler:
def computation(self, data_in):
return data_out
Worker
WorkerBase: one pass train
Define your Woker,inherit WorkerBase
from Common.Node.workerbase import WorkerBase
class YourWorker(WorkerBase):
def update():
gradients = super().get_gradients()
# define upload / download fucntion
super().set_gradients()