I am currently exploring the Flower architecture deployment runtime for my thesis topic. I would like to ask whether this initial model distribution is bundled with the server and client code in the Flower Application Bundle (FAB) or done in a different request, perhaps after SuperNode obtains the FAB and Run.
Hi @ddosantos , the initial model distribution is mostly defined by the ServerApp code, where you may provide the initial model parameters. Generally, the FAB only contains the code, not the raw model parameters. The flow is like:
On the SuperLink:
Get the FAB, load the ServerApp, and run the ServerApp
On the SuperNode:
Get the FAB, load the ClientApp, and run the ClientApp.
Inside ServerApp (i.e., in your code), you may define what’re the initial parameters. You may check that out via creating a template via flwr new command. Some users like to start just with a simple Net().state_dict(), but you can ofc customise it.
Thank you for your response, Mr. Pan-h. However, I still have a few questions regarding the runtime deployment architecture.
1. Is it true that the initial model distribution is performed during SuperNode GetFAB, or more specifically in this log: INFO: [Fleet.GetFab] Requesting FAB for fab_hash=24d24f4e43dff595bba8c75acd52220ca0b45d4ebe19f461ec48792b65fb38123.
2. Are the logs on SuperLink related to [Fleet.PullMessages] that often appear a mechanism for SuperNode to perform a pull (or in other words, ask if there are any runs in progress), or are these just logs for heartbeat?
3. When ServerApp is running, is its FL cycle the same as the one in the core architecture of the paper “Flower: A Friendly Federated Learning Research Framework”? So the FL Loop starts the federated round and orchestrates it, Strategy creates the current round configuration, and Client Manager manages the available client pool.
I apologize for asking so many questions because my thesis is conducting a proof-of-concept for Federated Learning using a framework (in this case, I chose Flower).
It’s nothing. Happy to help! Thanks for choosing Flower.
Re 1:
No, GetFAB is to get the Flower App Bundle, which contains source code. That is, GetFAB is used for the purpose of code delivery.
Re 2:
Each SuperNode will periodically ask the SuperLink if there’s any message for itself. We decided to adopt this mechanism instead of maintaining a long-standing bi-directional streaming channel cuz it’s a more robust setup in most real-world applications. It’s not for heartbeat purpose.
Re 3:
The paper was published a few years ago, so the Flower architecture is not strictly the same now. You may find better explainers in Flower docs, for example: Flower Architecture and Flower Strategy Abstraction, assuming you are working on the latest version of Flower.