Skip to content

Commit

Permalink
Update changelog for Flower 1.0 (#1339)
Browse files Browse the repository at this point in the history
* Update changelog for Flower 1.0
  • Loading branch information
danieljanes authored Jul 28, 2022
1 parent a30b427 commit c9c30ed
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 21 deletions.
26 changes: 13 additions & 13 deletions doc/source/changelog.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Changelog

## Unreleased
## v1.0.0 (2022-07-28)

### Highlights

- Optional client methods
- Stable **Virtual Client Engine** (accessible via `start_simulation`)
- All `Client`/`NumPyClient` methods are now optional
- Configurable `get_parameters`
- Stable Virtual Client Engine
- More powerful `start_simulation`
- Tons of small API cleanups resulting in a more coherent developer experience

### Contributors
### Thanks to our Contributors

We thank all contributors who made Flower 1.0 possible (in reverse [GitHub Contributors](https://github.com/adap/flower/graphs/contributors) order):
We would like to give our **special thanks** to all the contributors who made Flower 1.0 possible (in reverse [GitHub Contributors](https://github.com/adap/flower/graphs/contributors) order):

[@rtaiello](https://github.com/rtaiello),
[@g-pichler](https://github.com/g-pichler),
Expand Down Expand Up @@ -96,15 +96,15 @@ We thank all contributors who made Flower 1.0 possible (in reverse [GitHub Contr

Remove unmaintained experimental strategies (`FastAndSlow`, `FedFSv0`, `FedFSv1`).

- **Renamed** `Weights` **to** `NDArrays` ([#1258](https://github.com/adap/flower/pull/1258), [#1259](https://github.com/adap/flower/pull/1259))
- **Rename** `Weights` **to** `NDArrays` ([#1258](https://github.com/adap/flower/pull/1258), [#1259](https://github.com/adap/flower/pull/1259))

`flwr.common.Weights` was renamed to `flwr.common.NDArrays` to better capture what this type is all about.

- **Removed antiquated** `force_final_distributed_eval` **from** `start_server` ([#1258](https://github.com/adap/flower/pull/1258), [#1259](https://github.com/adap/flower/pull/1259))
- **Remove antiquated** `force_final_distributed_eval` **from** `start_server` ([#1258](https://github.com/adap/flower/pull/1258), [#1259](https://github.com/adap/flower/pull/1259))

The `start_server` parameter `force_final_distributed_eval` has long been a historic artefact, in this release it is finally gone for good.

- **Configurable** `get_parameters` ([#1242](https://github.com/adap/flower/pull/1242))
- **Make** `get_parameters` **configurable** ([#1242](https://github.com/adap/flower/pull/1242))

The `get_parameters` method now accepts a configuration dictionary, just like `get_properties`, `fit`, and `evaluate`.

Expand All @@ -114,7 +114,7 @@ We thank all contributors who made Flower 1.0 possible (in reverse [GitHub Contr

### New features

- **Official support for Python 3.10** ([#1320](https://github.com/adap/flower/pull/1320))
- **Support Python 3.10** ([#1320](https://github.com/adap/flower/pull/1320))

The previous Flower release introduced experimental support for Python 3.10, this release declares Python 3.10 support as stable.

Expand All @@ -140,15 +140,15 @@ We thank all contributors who made Flower 1.0 possible (in reverse [GitHub Contr

Removes the obsolete `simulation` example and renames `quickstart_simulation` to `simulation_tensorflow` so it fits withs the naming of `simulation_pytorch`

- **Updated documentation** ([#1223](https://github.com/adap/flower/pull/1223), [#1209](https://github.com/adap/flower/pull/1209), [#1251](https://github.com/adap/flower/pull/1251), [#1257](https://github.com/adap/flower/pull/1257), [#1267](https://github.com/adap/flower/pull/1267), [#1268](https://github.com/adap/flower/pull/1268), [#1300](https://github.com/adap/flower/pull/1300), [#1304](https://github.com/adap/flower/pull/1304), [#1305](https://github.com/adap/flower/pull/1305), [#1307](https://github.com/adap/flower/pull/1307))
- **Update documentation** ([#1223](https://github.com/adap/flower/pull/1223), [#1209](https://github.com/adap/flower/pull/1209), [#1251](https://github.com/adap/flower/pull/1251), [#1257](https://github.com/adap/flower/pull/1257), [#1267](https://github.com/adap/flower/pull/1267), [#1268](https://github.com/adap/flower/pull/1268), [#1300](https://github.com/adap/flower/pull/1300), [#1304](https://github.com/adap/flower/pull/1304), [#1305](https://github.com/adap/flower/pull/1305), [#1307](https://github.com/adap/flower/pull/1307))

One substantial documentation update fixes multiple smaller rendering issues, makes titles more succinct to improve navigation, removes a deprecated library, updates documentation dependencies, includes the `flwr.common` module in the API reference, includes support for markdown-based documentation, migrates the changelog from `.rst` to `.md`, and fixes a number of smaller details!

- **Minor updates**
- Add round number to fit and evaluate log messages ([#1266](https://github.com/adap/flower/pull/1266))
- Add secure gRPC connection to the `advanced_tensorflow` code example ([#847](https://github.com/adap/flower/pull/847))
- Updated developer tooling ([#1231](https://github.com/adap/flower/pull/1231), [#1276](https://github.com/adap/flower/pull/1276), [#1301](https://github.com/adap/flower/pull/1301), [#1310](https://github.com/adap/flower/pull/1310))
- Renamed ProtoBuf messages to improve consistency ([#1214](https://github.com/adap/flower/pull/1214), [#1258](https://github.com/adap/flower/pull/1258), [#1259](https://github.com/adap/flower/pull/1259))
- Update developer tooling ([#1231](https://github.com/adap/flower/pull/1231), [#1276](https://github.com/adap/flower/pull/1276), [#1301](https://github.com/adap/flower/pull/1301), [#1310](https://github.com/adap/flower/pull/1310))
- Rename ProtoBuf messages to improve consistency ([#1214](https://github.com/adap/flower/pull/1214), [#1258](https://github.com/adap/flower/pull/1258), [#1259](https://github.com/adap/flower/pull/1259))

## v0.19.0 (2022-05-18)

Expand Down
25 changes: 17 additions & 8 deletions doc/source/upgrade-to-flower-1.0.rst
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
Upgrade to Flower 1.0
=====================

Flower 1.0 is here! Along with new features, Flower 1.0 provides a stable foundation for future growth. Compared to Flower 0.19 (and other 0.x series releases), there are a few breaking changes that might make it necessary to change the code of existing 0.x-series projects.
Flower 1.0 is here. Along with new features, Flower 1.0 provides a stable foundation for future growth. Compared to Flower 0.19 (and other 0.x series releases), there are a few breaking changes that make it necessary to change the code of existing 0.x-series projects.

Install update
--------------

Here's how to update to Flower 1.0 using either pip or Poetry:
Here's how to update an existing installation to Flower 1.0 using either pip or Poetry:

- pip: add ``-U`` when installing.

- ``python -m pip install -U flwr`` (when using ``start_server`` and ``start_client``)
- ``python -m pip install -U flwr[simulation]`` (when using ``start_simulation``)

- Poetry: update the ``flwr`` dependency in ``pyproject.toml`` and then reinstall (don't forget to delete ``poetry.lock`` (``rm poetry.lock``) before running ``poetry install``).
- Poetry: update the ``flwr`` dependency in ``pyproject.toml`` and then reinstall (don't forget to delete ``poetry.lock`` via ``rm poetry.lock`` before running ``poetry install``).

- ``flwr = "^1.0.0"`` (when using ``start_server`` and ``start_client``)
- ``flwr = { version = "^1.0.0", extras = ["simulation"] }`` (when using ``start_simulation``)

Required changes
----------------

A few breaking changes require small manual updates:
The following breaking changes require manual updates.

General
~~~~~~~
Expand All @@ -45,17 +45,21 @@ Strategies / ``start_server`` / ``start_simulation``
- Flower 0.19: ``start_server(..., config={"num_rounds": 3, "round_timeout": 600.0}, ...)``
- Flower 1.0: ``start_server(..., config=flwr.server.ServerConfig(num_rounds=3, round_timeout=600.0), ...)``

- Replate ``num_rounds=1`` in ``start_simulation`` with the new ``config=ServerConfig(...)`` (see next item)
- Replace ``num_rounds=1`` in ``start_simulation`` with the new ``config=ServerConfig(...)`` (see previous item)
- Remove ``force_final_distributed_eval`` parameter from calls to ``start_server``. Distributed evaluation on all clients can be enabled by configuring the strategy to sample all clients for evaluation after the last round of training.
- Rename ``parameters_to_weights`` to ``parameters_to_ndarrays`` and ``weights_to_parameters`` to ``ndarrays_to_parameters``
- Strategy initialization: if the strategy relies on the default values for ``fraction_fit`` and ``fraction_evaluate``, set ``fraction_fit`` and ``fraction_evaluate`` manually to ``0.1``. Projects that do not manually create a strategy (by calling ``start_server`` or ``start_simulation`` without passing a strategy instance) should now initialize FedAvg with ``fraction_fit`` and ``fraction_evaluate`` set to ``0.1``.
- Rename ``rnd`` to ``server_round`` (``evaluate_fn``, ``configure_fit``, ``aggregate_fit``, ``configure_evaluate``, ``aggregate_evaluate``)
- Rename parameter/ndarray conversion functions:

- ``parameters_to_weights`` --> ``parameters_to_ndarrays``
- ``weights_to_parameters`` --> ``ndarrays_to_parameters``

- Strategy initialization: if the strategy relies on the default values for ``fraction_fit`` and ``fraction_evaluate``, set ``fraction_fit`` and ``fraction_evaluate`` manually to ``0.1``. Projects that do not manually create a strategy (by calling ``start_server`` or ``start_simulation`` without passing a strategy instance) should now manually initialize FedAvg with ``fraction_fit`` and ``fraction_evaluate`` set to ``0.1``.
- Rename built-in strategy parameters (e.g., ``FedAvg``):

- ``fraction_eval`` --> ``fraction_evaluate``
- ``min_eval_clients`` --> ``min_evaluate_clients``
- ``eval_fn`` --> ``evaluate_fn``

- Rename ``rnd`` to ``server_round``. This impacts multiple methods and functions, for example, ``configure_fit``, ``aggregate_fit``, ``configure_evaluate``, ``aggregate_evaluate``, and ``evaluate_fn``.
- Add ``server_round`` and ``config`` to ``evaluate_fn``:

- Flower 0.19: ``def evaluate(parameters: NDArrays) -> Optional[Tuple[float, Dict[str, Scalar]]]:``
Expand All @@ -77,3 +81,8 @@ Along with the necessary changes above, there are a number of potential improvem

- Remove "placeholder" methods from subclasses of ``Client`` or ``NumPyClient``. If you, for example, use server-side evaluation, then empy placeholder implementations of ``evaluate`` are no longer necessary.
- Configure the round timeout via ``start_simulation``: ``start_simulation(..., config=flwr.server.ServerConfig(num_rounds=3, round_timeout=600.0), ...)``

Further help
------------

Most official `Flower code examples <https://github.com/adap/flower/tree/main/examples>`_ are already updated to Flower 1.0, they can serve as a reference for using the Flower 1.0 API. If there are further questionsm, `join the Flower Slack <https://flower.dev/join-slack/>`_ and use the channgel ``#questions``.

0 comments on commit c9c30ed

Please sign in to comment.