Skip to content

0.16.0

Compare
Choose a tag to compare
@tanertopal tanertopal released this 11 May 09:00
· 2308 commits to main since this release
834e791

What's new?

  • New built-in strategies (#549)

    • (abstract) FedOpt
    • FedAdagrad
  • Custom metrics for server and strategies (#717)

    The Flower server is now fully task-agnostic, all remaining instances of task-specific metrics (such as :code:accuracy) have been replaced by custom metrics dictionaries. Flower 0.15 introduced the capability to pass a dictionary containing custom metrics from client to server. As of this release, custom metrics replace task-specific metrics on the server.

    Custom metric dictionaries are now used in two user-facing APIs: they are returned from Strategy methods :code:aggregate_fit/:code:aggregate_evaluate and they enable evaluation functions passed to build-in strategies (via :code:eval_fn) to return more than two evaluation metrics. Strategies can even return aggregated metrics dictionaries for the server to keep track of.

    Stratey implementations should migrate their :code:aggregate_fit and :code:aggregate_evaluate methods to the new return type (e.g., by simply returning an empty :code:{}), server-side evaluation functions should migrate from :code:return loss, accuracy to :code:return loss, {"accuracy": accuracy}.

    Flower 0.15-style return types are deprecated (but still supported), compatibility will be removed in a future release.

  • Migration warnings for deprecated functionality (#690)

    Earlier versions of Flower were often migrated to new APIs, while maintaining compatibility with legacy APIs. This release introduces detailed warning messages if usage of deprecated APIs is detected. The new warning messages often provide details on how to migrate to more recent APIs, thus easing the transition from one release to another.

  • Improved docs and docstrings (#691, #692, #713)

  • MXNet example and documentation

  • FedBN implementation in example PyTorch: From Centralized To Federated (#696, #702, #705)

Incompatible changes:

  • Serialization-agnostic server (#721)

    The Flower server is now fully serialization-agnostic. Prior usage of class :code:Weights (which represents parameters as deserialized NumPy ndarrays) was replaced by class :code:Parameters (e.g., in :code:Strategy). :code:Parameters objects are fully serialization-agnostic and represents parameters as byte arrays, the :code:tensor_type attributes indicates how these byte arrays should be interpreted (e.g., for serialization/deserialization).

    Built-in strategies implement this approach by handling serialization and deserialization to/from :code:Weights internally. Custom/3rd-party Strategy implementations should update to the slighly changed Strategy method definitions. Strategy authors can consult PR #721 to see how strategies can easily migrate to the new format.

  • Deprecated :code:flwr.server.Server.evaluate, use :code:flwr.server.Server.evaluate_round instead (#717)