Flower 0.19 Release

Flower 0.19 is available! 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.19 is easy:

pip install -U flwr

What's new:

  • Flower Baselines (preview): FedOpt, FedBN, FedAvgM (919, 1127, 914)

    The first preview release of Flower Baselines has arrived! We're kickstarting Flower Baselines with implementations of FedOpt (FedYogi, FedAdam, FedAdagrad), FedBN, and FedAvgM. Check the documentation on how to use Flower Baselines. With this first preview release we're also inviting the community to contribute their own baselines.

  • C++ client SDK (preview) and code example (1111)

    Preview support for Flower clients written in C++. The C++ preview includes a Flower client SDK and a quickstart code example that demonstrates a simple C++ client using the SDK.

  • Add experimental support for Python 3.10 and Python 3.11 (1135)

    Python 3.10 is the latest stable release of Python and Python 3.11 is due to be released in October. This Flower release adds experimental support for both Python versions.

  • Aggregate custom metrics through user-provided functions (1144)

    Custom metrics (e.g., accuracy) can now be aggregated without having to customize the strategy. Built-in strategies support two new arguments, fit_metrics_aggregation_fn and evaluate_metrics_aggregation_fn, that allow passing custom metric aggregation functions.

  • User-configurable round timeout (1162)

    A new configuration value allows the round timeout to be set for start_server and start_simulation. If the config dictionary contains a round_timeout key (with a float value in seconds), the server will wait at least round_timeout seconds before it closes the connection.

  • Enable both federated evaluation and centralized evaluation to be used at the same time in all built-in strategies (1091)

    Built-in strategies can now perform both federated evaluation (i.e., client-side) and centralized evaluation (i.e., server-side) in the same round. Federated evaluation can be disabled by setting fraction_eval to 0.0.

  • Two new Jupyter Notebook tutorials (1141)

    Two Jupyter Notebook tutorials (compatible with Google Colab) explain basic and intermediate Flower features:

    An Introduction to Federated Learning: Open in Colab

    Using Strategies in Federated Learning: Open in Colab

  • New FedAvgM strategy (Federated Averaging with Server Momentum) (1076)

    The new FedAvgM strategy implements Federated Averaging with Server Momentum [Hsu et al., 2019].

  • New advanced PyTorch code example (1007)

    A new code example (advanced_pytorch) demonstrates advanced Flower concepts with PyTorch.

  • New JAX code example (906, 1143)

    A new code example (jax_from_centralized_to_federated) shows federated learning with JAX and Flower.

  • Minor updates

    • New option to keep Ray running if Ray was already initialized in start_simulation (1177)
    • Add support for custom ClientManager as a start_simulation parameter (1171)
    • New documentation for implementing strategies (1097, 1175)
    • New mobile-friendly documentation theme (1174)
    • Limit version range for (optional) ray dependency to include only compatible releases (>=1.9.2,<1.12.0) (1205)

Incompatible changes:

  • Remove deprecated support for Python 3.6 (871)
  • Remove deprecated KerasClient (857)
  • Remove deprecated no-op extra installs (973)
  • Remove deprecated proto fields from FitRes and EvaluateRes (869)
  • Remove deprecated QffedAvg strategy (replaced by QFedAvg) (1107)
  • Remove deprecated DefaultStrategy strategy (1142)
  • Remove deprecated support for eval_fn accuracy return value (1142)
  • Remove deprecated support for passing initial parameters as NumPy ndarrays (1142)