The Flower Team is excited to announce the release of Flower 1.11 stable and it’s packed with updates!
Flower is a friendly framework for collaborative AI and data science.
It makes novel approaches such as federated learning, federated evaluation,
federated analytics, and fleet learning accessible to a wide audience of researchers and engineers.
Thanks to our contributors
We would like to give our special thanks to all the contributors who made the new version of Flower possible (in git shortlog order):
Adam Narozniak, Charles Beauville, Chong Shen Ng, Daniel J. Beutel, Daniel Nata Nugraha, Danny, Edoardo Gabrielli, Heng Pan, Javier, Meng Yan, Michal Danilowski, Mohammad Naseri, Robert Steiner, Steve Laskaridis, Taner Topal, Yan Gao
What’s new?
-
Deliver Flower App Bundle (FAB) to SuperLink and SuperNodes (#4006, #3945, #3999, #4027, #3851, #3946, #4003, #4029, #3942, #3957, #4020, #4044, #3852, #4019, #4031, #4036, #4049, #4017, #3943, #3944, #4011, #3619)
Dynamic code updates are here!
flwr runcan now ship and install the latest version of yourServerAppandClientAppto an already-running federation (SuperLink and SuperNodes).How does it work?
flwr runbundles your Flower app into a single FAB (Flower App Bundle) file. It then ships this FAB file, via the SuperExec, to both the SuperLink and those SuperNodes that need it. This allows you to keep SuperExec, SuperLink and SuperNodes running as permanent infrastructure, and then ship code updates (including completely new projects!) dynamically.flwr runis all you need. -
Introduce isolated
ClientAppexecution (#3970, #3976, #4002, #4001, #4034, #4037, #3977, #4042, #3978, #4039, #4033, #3971, #4035, #3973, #4032)The SuperNode can now run your
ClientAppin a fully isolated way. In an enterprise deployment, this allows you to set strict limits on what theClientAppcan and cannot do.flower-supernodesupports three--isolationmodes:- Unset: The SuperNode runs the
ClientAppin the same process (as in previous versions of Flower). This is the default mode. --isolation=subprocess: The SuperNode starts a subprocess to run theClientApp.--isolation=process: The SuperNode expects an externally-managed process to run theClientApp. This external process is not managed by the SuperNode, so it has to be started beforehand and terminated manually. The common way to use this isolation mode is via the newflwr/clientappDocker image.
- Unset: The SuperNode runs the
-
Improve Docker support for enterprise deployments (#4050, #4090, #3784, #3998, #4094, #3722)
Flower 1.11 ships many Docker improvements that are especially useful for enterprise deployments:
flwr/supernodecomes with a new Alpine Docker image.flwr/clientappis a new image to be used with the--isolation=processoption. In this mode, SuperNode andClientApprun in two different Docker containers.flwr/supernode(preferably the Alpine version) runs the long-running SuperNode with--isolation=process.flwr/clientappruns theClientApp. This is the recommended way to deploy Flower in enterprise settings.- New all-in-one Docker Compose enables you to easily start a full Flower Deployment Engine on a single machine.
- Completely new Docker documentation: Flower Framework main
-
Improve SuperNode authentication (#4043, #4047, #4074)
SuperNode auth has been improved in several ways, including improved logging, improved testing, and improved error handling.
-
Update
flwr newtemplates (#3933, #3894, #3930, #3931, #3997, #3979, #3965, #4013, #4064)All
flwr newtemplates have been updated to show the latest recommended use of Flower APIs. -
Improve Simulation Engine (#4095, #3913, #4059, #3954, #4071, #3985, #3988)
The Flower Simulation Engine comes with several updates, including improved run config support, verbose logging, simulation backend configuration via
flwr run, and more. -
Improve
RecordSet(#4052, #3218, #4016)RecordSetis the core object to exchange model parameters, configuration values and metrics betweenClientAppandServerApp. This release ships several smaller improvements toRecordSetand related*Recordtypes. -
Update documentation (#3972, #3925, #4061, #3984, #3917, #3900, #4066, #3765, #4021, #3906, #4063, #4076, #3920, #3916)
Many parts of the documentation, including the main tutorial, have been migrated to show new Flower APIs and other new Flower features like the improved Docker support.
-
Migrate code example to use new Flower APIs (#3758, #3701, #3919, #3918, #3934, #3893, #3833, #3922, #3846, #3777, #3874, #3873, #3935, #3754, #3980, #4089, #4046, #3314, #3316, #3295, #3313)
Many code examples have been migrated to use new Flower APIs.
-
Update Flower framework, framework internals and quality infrastructure (#4018, #4053, #4098, #4067, #4105, #4048, #4107, #4069, #3915, #4101, #4108, #3914, #4068, #4041, #4040, #3986, #4026, #3961, #3975, #3983, #4091, #3982, #4079, #4073, #4060, #4106, #4080, #3974, #3996, #3991, #3981, #4093, #4100, #3939, #3955, #3940, #4038)
As always, many parts of the Flower framework and quality infrastructure were improved and updated.
Deprecations
-
Deprecate accessing
ContextviaClient.context(#3797)Now that both
client_fnandserver_fnreceive aContextobject, accessingContextviaClient.contextis deprecated.Client.contextwill be removed in a future release. If you need to accessContextin yourClientimplementation, pass it manually when creating theClientinstance inclient_fn:def client_fn(context: Context) -> Client: return FlowerClient(context).to_client()
Incompatible changes
-
Update CLIs to accept an app directory instead of
ClientAppandServerApp(#3952, #4077, #3850)The CLI commands
flower-supernodeandflower-server-appnow accept an app directory as argument (instead of references to aClientApporServerApp). An app directory is any directory containing apyproject.tomlfile (with the appropriate Flower config fields set). The easiest way to generate a compatible project structure is to useflwr new. -
Disable
flower-client-appCLI command (#4022)flower-client-apphas been disabled. Useflower-supernodeinstead. -
Use spaces instead of commas for separating config args (#4000)
When passing configs (run config, node config) to Flower, you now need to separate key-value pairs using spaces instead of commas. For example:
flwr run . --run-config "learning-rate=0.01 num_rounds=10" # WorksPreviously, you could pass configs using commas, like this:
flwr run . --run-config "learning-rate=0.01,num_rounds=10" # Doesn't work -
Remove
flwr exampleCLI command (#4084)The experimental
flwr exampleCLI command has been removed. Useflwr newto generate a project and then run it usingflwr run.
