Client
The client is a microservice that exposes the infrastructure required to communicate with the server. It is however independent of the machine learning tools. The training loop is defined externally by the user, and then is "proxied" by the client.
App
Entry point to start a client node. The setup is done automatically on startup and assumes the server is reachable.
Fed.Client.build_router — Functionbuild_router(node::Node)Build the routes to the node endpoints.
Fed.Client.start — Functionstart(node::Node)Start the given node by setting up its router, and registering it to the server.
Node
Data structure containing the client's configuration and its API for communicating with the server.
Fed.Client.Node — TypeNode(host, port, fit, config)Orchestrate the training on local data of the clients participating in the federated training. A Node is registerating itself to the server on startup, and then wait for server requests for training on its local data.
The fit function is called "proxied function". It should define the training loop and respect the following signature:
fit(weights::Vector{Float32})::Vector{Float32}Where weights is a flatten 1D array contianing the model parameters.
Fed.Client.fit_service — Functionfit_service(node::Node, request::HTTP.Request)Fit the received weights contained in the request with the node's local data, and return the updated weights to the caller. This function is calling the "proxied function" fit from the Node.
API Endpoint: this is an HTTP client endpoint.
Fed.Client.register_to_server — Functionregister_to_server(node::Node)Register the node to the server, letting it knows that a node is available to take part in the training.
API Client: this is an HTTP client request.