You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C++ is one of the most defining programming languages of our time. It is used in many critical applications and the go-to language for performance-sensitive applications, such as robotics or automotive. Federated Learning can enable entirely new platforms in these domains and we thus want to support C++ by providing a Flower C++ SDK. Flower communicates between the server and the client using gRPC. At the moment, every C++ user needs to build their own integration with the gRPC message protocol to run Flower.
Prep Work / PoC
The C++ SDK needs to serialize model parameters (and other values that get communicated between client and server) in a way that can be de-serialized by Python on the server-side. ProtoBuf makes this easy for most values, but it might be helpful to build a small proof of concept for serializing/deserializing the model parameters. Flower represents model parameters as a list of byte arrays (think: the parameters of each layer in a neural network can be serialized to a single byte array). A PoC would then serialized these parameters in C++ and deserialized them in Python (and vice versa):
Define a simple machine learning model using C++/libtorch
Extract the model parameters from the model in C++
Serialize the extracted model parameters into a byte array / a list of byte arrays
Save the list of byte arrays to disk
Read the list of byte arrays from Python
Deserialize the model parameters from the list of byte arrays
Load a PyTorch model and update it using the deserialized model parameters
Implement the flow in reverse (serialize in Python, deserialize in C++)
Expected Outcome
The full SDK implementation requires the following tasks:
Set up C++ tooling in the Flower codebase
Run tests on CI
Set up ProtoBuf/gRPC compilation for C++
Define the user-facing API of the C++ SDK
Define abstract class / interface which Flower users can override
Define a function to start the client
Implement the API
Establish a connection to the server
Implement handling of protocol messages
Test the new SDK
Document everything
Build a C++ library and publish it
Build a code example using the C++ SDK and libtorch (PyTorch C++ API)
Description
C++ is one of the most defining programming languages of our time. It is used in many critical applications and the go-to language for performance-sensitive applications, such as robotics or automotive. Federated Learning can enable entirely new platforms in these domains and we thus want to support C++ by providing a Flower C++ SDK. Flower communicates between the server and the client using gRPC. At the moment, every C++ user needs to build their own integration with the gRPC message protocol to run Flower.
Prep Work / PoC
The C++ SDK needs to serialize model parameters (and other values that get communicated between client and server) in a way that can be de-serialized by Python on the server-side. ProtoBuf makes this easy for most values, but it might be helpful to build a small proof of concept for serializing/deserializing the model parameters. Flower represents model parameters as a list of byte arrays (think: the parameters of each layer in a neural network can be serialized to a single byte array). A PoC would then serialized these parameters in C++ and deserialized them in Python (and vice versa):
Expected Outcome
The full SDK implementation requires the following tasks:
Required Skills:
The text was updated successfully, but these errors were encountered: