Published

Flower 0.18 Release

Photo of Taner Topal
Taner Topal
Founder & COO of Adap

Flower 0.18 is finally available! After a longer break than usual, the new Flower release comes with more updates than any prior release. Special thanks go to our amazing community for their continued support and contributions.

Upgrading to Flower 0.18 is easy:

pip install -U flwr

What's new?

  • Improved Virtual Client Engine compatibility with Jupyter Notebook / Google Colab

    Simulations (using the Virtual Client Engine through start_simulation) now work more smoothly on Jupyter Notebooks (incl. Google Colab) after installing Flower with the simulation extra (pip install flwr[simulation]).

  • New Jupyter Notebook code example

    A new code example (quickstart_simulation) demonstrates Flower simulations using the Virtual Client Engine through Jupyter Notebook (incl. Google Colab). Using Flower has never been easier: Colab badge

  • Client properties (feature preview) Clients can implement a new method get_properties to enable server-side strategies to query client properties.

  • Experimental Android support with TFLite

    Android support has finally arrived in main! Flower is both client-agnostic and framework-agnostic by design. One can integrate arbitrary client platforms and with this release, using Flower on Android has become a lot easier.

    The example uses TFLite on the client side, along with a new FedAvgAndroid strategy. The Android client and FedAvgAndroid are still experimental, but they are a first step towards a fully-fledged Android SDK and a unified FedAvg implementation that integrated the new functionality from FedAvgAndroid.

  • Make gRPC keepalive time user-configurable and decrease default keepalive time

    The default gRPC keepalive time has been reduced to increase the compatibility of Flower with more cloud environments (for example, Microsoft Azure). Users can configure the keepalive time to customize the gRPC stack based on specific requirements.

  • New differential privacy example using Opacus and PyTorch

    A new code example (opacus) demonstrates differentially-private federated learning with Opacus, PyTorch, and Flower.

  • New Hugging Face Transformers code example

    A new code example (quickstart_huggingface) demonstrates usage of Hugging Face Transformers with Flower.

  • New MLCube code example

    A new code example (quickstart_mlcube) demonstrates usage of MLCube with Flower.

  • SSL-enabled server and client

    SSL enables secure encrypted connections between clients and servers. This release open-sources the Flower secure gRPC implementation to make encrypted communication channels accessible to all Flower users.

  • Updated FedAdam and FedYogi strategies

    FedAdam and FedAdam match the latest version of the Adaptive Federated Optimization paper.

  • Initialize start_simulation with a list of client IDs

    start_simulation can now be called with a list of client IDs (clients_ids, type: List[str]). Those IDs will be passed to the client_fn whenever a client needs to be initialized, which can make it easier to load data partitions that are not accessible through int identifiers.

  • Minor updates

    • Update num_examples calculation in PyTorch code examples in
    • Expose Flower version through flwr.__version__
    • start_server in app.py now returns a History object containing metrics from training
    • Make max_workers (used by ThreadPoolExecutor) configurable
    • Increase sleep time after server start to three seconds in all code examples
    • Added a new FAQ section to the documentation
    • And many more under-the-hood changes, library updates, documentation changes, and tooling improvements!

Incompatible changes:

  • Removed flwr_example and flwr_experimental from release build

    The packages flwr_example and flwr_experimental have been deprecated since Flower 0.12.0 and they are not longer included in Flower release builds. The associated extras (baseline, examples-pytorch, examples-tensorflow, http-logger, ops) are now no-op and will be removed in an upcoming release.