From f4e1c2dd700edc7654fc74afe25217fc3ba321f2 Mon Sep 17 00:00:00 2001 From: mohammadnaseri Date: Sun, 4 Feb 2024 13:08:45 +0000 Subject: [PATCH 1/6] Docs improvment (#2900) * Improve doc * Improve doc --- ...al-series-get-started-with-flower-pytorch.ipynb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/source/tutorial-series-get-started-with-flower-pytorch.ipynb b/doc/source/tutorial-series-get-started-with-flower-pytorch.ipynb index bbd916b32375..704ed520bf3e 100644 --- a/doc/source/tutorial-series-get-started-with-flower-pytorch.ipynb +++ b/doc/source/tutorial-series-get-started-with-flower-pytorch.ipynb @@ -83,7 +83,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "It is possible to switch to a runtime that has GPU acceleration enabled (on Google Colab: `Runtime > Change runtime type > Hardware acclerator: GPU > Save`). Note, however, that Google Colab is not always able to offer GPU acceleration. If you see an error related to GPU availability in one of the following sections, consider switching back to CPU-based execution by setting `DEVICE = torch.device(\"cpu\")`. If the runtime has GPU acceleration enabled, you should see the output `Training on cuda`, otherwise it'll say `Training on cpu`." + "It is possible to switch to a runtime that has GPU acceleration enabled (on Google Colab: `Runtime > Change runtime type > Hardware accelerator: GPU > Save`). Note, however, that Google Colab is not always able to offer GPU acceleration. If you see an error related to GPU availability in one of the following sections, consider switching back to CPU-based execution by setting `DEVICE = torch.device(\"cpu\")`. If the runtime has GPU acceleration enabled, you should see the output `Training on cuda`, otherwise it'll say `Training on cpu`." ] }, { @@ -368,14 +368,14 @@ "metadata": {}, "outputs": [], "source": [ - "def get_parameters(net) -> List[np.ndarray]:\n", - " return [val.cpu().numpy() for _, val in net.state_dict().items()]\n", - "\n", - "\n", "def set_parameters(net, parameters: List[np.ndarray]):\n", " params_dict = zip(net.state_dict().keys(), parameters)\n", " state_dict = OrderedDict({k: torch.Tensor(v) for k, v in params_dict})\n", - " net.load_state_dict(state_dict, strict=True)" + " net.load_state_dict(state_dict, strict=True)\n", + "\n", + "\n", + "def get_parameters(net) -> List[np.ndarray]:\n", + " return [val.cpu().numpy() for _, val in net.state_dict().items()]" ] }, { @@ -485,7 +485,7 @@ ")\n", "\n", "# Specify the resources each of your clients need. By default, each\n", - "# client will be allocated 1x CPU and 0x CPUs\n", + "# client will be allocated 1x CPU and 0x GPUs\n", "client_resources = {\"num_cpus\": 1, \"num_gpus\": 0.0}\n", "if DEVICE.type == \"cuda\":\n", " # here we are asigning an entire GPU for each client.\n", From 443d1f3f42b63c1a7ff54c45f518756db2851e1b Mon Sep 17 00:00:00 2001 From: "Daniel J. Beutel" Date: Mon, 5 Feb 2024 12:17:04 +0100 Subject: [PATCH 2/6] Update changelog for Flower 1.7 (#2897) --- doc/source/ref-changelog.md | 85 +++++++++++++++++++++++++++++++------ 1 file changed, 73 insertions(+), 12 deletions(-) diff --git a/doc/source/ref-changelog.md b/doc/source/ref-changelog.md index 685553aee657..3e9a49977b76 100644 --- a/doc/source/ref-changelog.md +++ b/doc/source/ref-changelog.md @@ -2,29 +2,90 @@ ## Unreleased -- **Add scikit-learn tabular data example** ([#2719](https://github.com/adap/flower/pull/2719)) +### What's new? + +- **Introduce stateful clients (experimental)** ([#2770](https://github.com/adap/flower/pull/2770), [#2686](https://github.com/adap/flower/pull/2686), [#2696](https://github.com/adap/flower/pull/2696), [#2643](https://github.com/adap/flower/pull/2643), [#2769](https://github.com/adap/flower/pull/2769)) + + Subclasses of `Client` and `NumPyClient` can now store local state that remains on the client. Let's start with the highlight first: this new feature is compatible with both simulated clients (via `start_simulation`) and networked clients (via `start_client`). It's also the first preview of new abstractions like `Context` and `RecordSet`. Clients can access state of type `RecordSet` via `state: RecordSet = self.context.state`. Changes to this `RecordSet` are preserved across different rounds of execution to enable stateful computations in a unified way across simulation and deployment. + +- **Improve performance** ([#2293](https://github.com/adap/flower/pull/2293)) + + Flower is faster than ever. All `FedAvg`-derived strategies now use in-place aggregation to reduce memory consumption. The Flower client serialization/deserialization has been rewritten from the ground up, which results in significant speedups, especially when the client-side training time is short. + +- **Support Federated Learning with Apple MLX and Flower** ([#2693](https://github.com/adap/flower/pull/2693)) + + Flower has official support for federated learning using [Appple MLX](https://ml-explore.github.io/mlx) via the new `quickstart-mlx` code example. + +- **Introduce new XGBoost cyclic strategy** ([#2666](https://github.com/adap/flower/pull/2666), [#2668](https://github.com/adap/flower/pull/2668)) + + A new strategy called `FedXgbCyclic` supports a client-by-client style of training (often called cyclic). The `xgboost-comprehensive` code example shows how to use it in a full project. In addition to that, `xgboost-comprehensive` now also supports simulation mode. With this, Flower offers best-in-class XGBoost support. + +- **Support Python 3.11** ([#2394](https://github.com/adap/flower/pull/2394)) + + Framework tests now run on Python 3.8, 3.9, 3.10, and 3.11. This will ensure better support for users using more recent Python versions. + +- **Update gRPC and ProtoBuf dependencies** ([#2814](https://github.com/adap/flower/pull/2814)) + + The `grpcio` and `protobuf` dependencies were updated to their latest versions for improved security and performance. + +- **Introduce Docker image for Flower server** ([#2700](https://github.com/adap/flower/pull/2700), [#2688](https://github.com/adap/flower/pull/2688), [#2705](https://github.com/adap/flower/pull/2705), [#2695](https://github.com/adap/flower/pull/2695), [#2747](https://github.com/adap/flower/pull/2747), [#2746](https://github.com/adap/flower/pull/2746), [#2680](https://github.com/adap/flower/pull/2680), [#2682](https://github.com/adap/flower/pull/2682), [#2701](https://github.com/adap/flower/pull/2701)) + + The Flower server can now be run using an official Docker image. A new how-to guide explains [how to run Flower using Docker](https://flower.dev/docs/framework/how-to-run-flower-using-docker.html). An official Flower client Docker image will follow. -- **General updates to Flower Examples** ([#2381](https://github.com/adap/flower/pull/2381)) +- **Introduce** `flower-via-docker-compose` **example** ([#2626](https://github.com/adap/flower/pull/2626)) -- **Retiring MXNet examples** The development of the MXNet fremework has ended and the project is now [archived on GitHub](https://github.com/apache/mxnet). Existing MXNet examples won't receive updates [#2724](https://github.com/adap/flower/pull/2724) +- **Introduce** `quickstart-sklearn-tabular` **example** ([#2719](https://github.com/adap/flower/pull/2719)) -- **Deprecated `start_numpy_client`**. ([#2563](https://github.com/adap/flower/pull/2563)) +- **Introduce** `custom-metrics` **example** ([#1958](https://github.com/adap/flower/pull/1958)) - Until now, clients of type `NumPyClient` needed to be started via `start_numpy_client`. In our efforts to consolidate the core framework, we have introduced changes, and now all client types should start via `start_client`. To continue using `NumPyClient` clients, you simply need to first call the `.to_client()` method and then pass returned `Client` object to `start_client`. The examples and the documentation have been updated accordingly. +- **Update code examples to use Flower Datasets** ([#2450](https://github.com/adap/flower/pull/2450), [#2456](https://github.com/adap/flower/pull/2456), [#2318](https://github.com/adap/flower/pull/2318), [#2712](https://github.com/adap/flower/pull/2712)) + + Several code examples were updated to use [Flower Datasets](https://flower.dev/docs/datasets/). + +- **General updates to Flower Examples** ([#2381](https://github.com/adap/flower/pull/2381), [2805](https://github.com/adap/flower/pull/2805), [2782](https://github.com/adap/flower/pull/2782), [2806](https://github.com/adap/flower/pull/2806), [2829](https://github.com/adap/flower/pull/2829), [2825](https://github.com/adap/flower/pull/2825), [2816](https://github.com/adap/flower/pull/2816), [#2726](https://github.com/adap/flower/pull/2726), [#2659](https://github.com/adap/flower/pull/2659), [#2655](https://github.com/adap/flower/pull/2655)) + + Many Flower code examples received substantial updates. - **Update Flower Baselines** - - HFedXGBoost [#2226](https://github.com/adap/flower/pull/2226) + - HFedXGBoost ([#2226](https://github.com/adap/flower/pull/2226), [#2771](https://github.com/adap/flower/pull/2771)) + - FedVSSL ([#2412](https://github.com/adap/flower/pull/2412)) + - FedNova ([#2179](https://github.com/adap/flower/pull/2179)) + - HeteroFL ([#2439](https://github.com/adap/flower/pull/2439)) + - FedAvgM ([#2246](https://github.com/adap/flower/pull/2246)) + - FedPara ([#2722](https://github.com/adap/flower/pull/2722)) + +- **Improve documentation** ([#2674](https://github.com/adap/flower/pull/2674), [#2480](https://github.com/adap/flower/pull/2480), [#2826](https://github.com/adap/flower/pull/2826), [#2727](https://github.com/adap/flower/pull/2727), [#2761](https://github.com/adap/flower/pull/2761), [#2900](https://github.com/adap/flower/pull/2900)) + +- **Improved testing and development infrastructure** ([#2797](https://github.com/adap/flower/pull/2797), [#2676](https://github.com/adap/flower/pull/2676), [#2644](https://github.com/adap/flower/pull/2644), [#2656](https://github.com/adap/flower/pull/2656), [#2848](https://github.com/adap/flower/pull/2848), [#2675](https://github.com/adap/flower/pull/2675), [#2735](https://github.com/adap/flower/pull/2735), [#2767](https://github.com/adap/flower/pull/2767), [#2732](https://github.com/adap/flower/pull/2732), [#2744](https://github.com/adap/flower/pull/2744), [#2681](https://github.com/adap/flower/pull/2681), [#2699](https://github.com/adap/flower/pull/2699), [#2745](https://github.com/adap/flower/pull/2745), [#2734](https://github.com/adap/flower/pull/2734), [#2731](https://github.com/adap/flower/pull/2731), [#2652](https://github.com/adap/flower/pull/2652), [#2720](https://github.com/adap/flower/pull/2720), [#2721](https://github.com/adap/flower/pull/2721), [#2717](https://github.com/adap/flower/pull/2717), [#2864](https://github.com/adap/flower/pull/2864), [#2694](https://github.com/adap/flower/pull/2694), [#2709](https://github.com/adap/flower/pull/2709), [#2658](https://github.com/adap/flower/pull/2658), [#2796](https://github.com/adap/flower/pull/2796), [#2692](https://github.com/adap/flower/pull/2692), [#2657](https://github.com/adap/flower/pull/2657), [#2813](https://github.com/adap/flower/pull/2813), [#2661](https://github.com/adap/flower/pull/2661), [#2398](https://github.com/adap/flower/pull/2398)) + + The Flower testing and development infrastructure has received substantial updates. This makes Flower 1.7 the most tested release ever. + +- **Update dependencies** ([#2753](https://github.com/adap/flower/pull/2753), [#2651](https://github.com/adap/flower/pull/2651), [#2739](https://github.com/adap/flower/pull/2739), [#2837](https://github.com/adap/flower/pull/2837), [#2788](https://github.com/adap/flower/pull/2788), [#2811](https://github.com/adap/flower/pull/2811), [#2774](https://github.com/adap/flower/pull/2774), [#2790](https://github.com/adap/flower/pull/2790), [#2751](https://github.com/adap/flower/pull/2751), [#2850](https://github.com/adap/flower/pull/2850), [#2812](https://github.com/adap/flower/pull/2812), [#2872](https://github.com/adap/flower/pull/2872), [#2736](https://github.com/adap/flower/pull/2736), [#2756](https://github.com/adap/flower/pull/2756), [#2857](https://github.com/adap/flower/pull/2857), [#2757](https://github.com/adap/flower/pull/2757), [#2810](https://github.com/adap/flower/pull/2810), [#2740](https://github.com/adap/flower/pull/2740), [#2789](https://github.com/adap/flower/pull/2789)) + +- **General improvements** ([#2803](https://github.com/adap/flower/pull/2803), [2847](https://github.com/adap/flower/pull/2847), [2877](https://github.com/adap/flower/pull/2877), [2690](https://github.com/adap/flower/pull/2690), [2889](https://github.com/adap/flower/pull/2889), [2874](https://github.com/adap/flower/pull/2874), [2819](https://github.com/adap/flower/pull/2819), [2689](https://github.com/adap/flower/pull/2689), [2457](https://github.com/adap/flower/pull/2457), [2870](https://github.com/adap/flower/pull/2870), [2669](https://github.com/adap/flower/pull/2669), [2876](https://github.com/adap/flower/pull/2876), [2885](https://github.com/adap/flower/pull/2885), [2858](https://github.com/adap/flower/pull/2858), [2867](https://github.com/adap/flower/pull/2867), [2351](https://github.com/adap/flower/pull/2351), [2886](https://github.com/adap/flower/pull/2886), [2860](https://github.com/adap/flower/pull/2860), [2828](https://github.com/adap/flower/pull/2828), [2869](https://github.com/adap/flower/pull/2869), [2875](https://github.com/adap/flower/pull/2875), [2733](https://github.com/adap/flower/pull/2733), [2488](https://github.com/adap/flower/pull/2488), [2646](https://github.com/adap/flower/pull/2646), [2879](https://github.com/adap/flower/pull/2879), [2821](https://github.com/adap/flower/pull/2821), [2855](https://github.com/adap/flower/pull/2855), [2800](https://github.com/adap/flower/pull/2800), [2807](https://github.com/adap/flower/pull/2807), [2801](https://github.com/adap/flower/pull/2801), [2804](https://github.com/adap/flower/pull/2804), [2851](https://github.com/adap/flower/pull/2851), [2787](https://github.com/adap/flower/pull/2787), [2852](https://github.com/adap/flower/pull/2852), [#2672](https://github.com/adap/flower/pull/2672), [#2759](https://github.com/adap/flower/pull/2759)) + +### Incompatible changes + +- **Deprecate** `start_numpy_client` ([#2563](https://github.com/adap/flower/pull/2563), [#2718](https://github.com/adap/flower/pull/2718)) + + Until now, clients of type `NumPyClient` needed to be started via `start_numpy_client`. In our efforts to consolidate framework APIs, we have introduced changes, and now all client types should start via `start_client`. To continue using `NumPyClient` clients, you simply need to first call the `.to_client()` method and then pass returned `Client` object to `start_client`. The examples and the documentation have been updated accordingly. + +- **Deprecate legacy DP wrappers** ([#2749](https://github.com/adap/flower/pull/2749)) + + Legacy DP wrapper classes are deprecated, but still functional. This is in preparation for an all-new pluggable version of differential privacy support in Flower. + +- **Make optional arg** `--callable` **in** `flower-client` **a required positional arg** ([#2673](https://github.com/adap/flower/pull/2673)) - - FedVSSL [#2412](https://github.com/adap/flower/pull/2412) +- **Rename** `certificates` **to** `root_certificates` **in** `Driver` ([#2890](https://github.com/adap/flower/pull/2890)) - - FedNova [#2179](https://github.com/adap/flower/pull/2179) +- **Drop experimental** `Task` **fields** ([#2866](https://github.com/adap/flower/pull/2866), [#2865](https://github.com/adap/flower/pull/2865)) - - HeteroFL [#2439](https://github.com/adap/flower/pull/2439) + Experimental fields `sa`, `legacy_server_message` and `legacy_client_message` were removed from `Task` message. The removed fields are superseded by the new `RecordSet` abstraction. - - FedAvgM [#2246](https://github.com/adap/flower/pull/2246) +- **Retire MXNet examples** ([#2724](https://github.com/adap/flower/pull/2724)) - - FedPara [#2722](https://github.com/adap/flower/pull/2722) + The development of the MXNet fremework has ended and the project is now [archived on GitHub](https://github.com/apache/mxnet). Existing MXNet examples won't receive updates. ## v1.6.0 (2023-11-28) @@ -104,7 +165,7 @@ We would like to give our special thanks to all the contributors who made the ne - FedBN ([#2608](https://github.com/adap/flower/pull/2608), [#2615](https://github.com/adap/flower/pull/2615)) -- **General updates to Flower Examples** ([#2384](https://github.com/adap/flower/pull/2384),[#2425](https://github.com/adap/flower/pull/2425), [#2526](https://github.com/adap/flower/pull/2526), [#2302](https://github.com/adap/flower/pull/2302), [#2545](https://github.com/adap/flower/pull/2545)) +- **General updates to Flower Examples** ([#2384](https://github.com/adap/flower/pull/2384), [#2425](https://github.com/adap/flower/pull/2425), [#2526](https://github.com/adap/flower/pull/2526), [#2302](https://github.com/adap/flower/pull/2302), [#2545](https://github.com/adap/flower/pull/2545)) - **General updates to Flower Baselines** ([#2301](https://github.com/adap/flower/pull/2301), [#2305](https://github.com/adap/flower/pull/2305), [#2307](https://github.com/adap/flower/pull/2307), [#2327](https://github.com/adap/flower/pull/2327), [#2435](https://github.com/adap/flower/pull/2435), [#2462](https://github.com/adap/flower/pull/2462), [#2463](https://github.com/adap/flower/pull/2463), [#2461](https://github.com/adap/flower/pull/2461), [#2469](https://github.com/adap/flower/pull/2469), [#2466](https://github.com/adap/flower/pull/2466), [#2471](https://github.com/adap/flower/pull/2471), [#2472](https://github.com/adap/flower/pull/2472), [#2470](https://github.com/adap/flower/pull/2470)) From ef37922ca49bf9233fdc6d9e9369177bbfa922a4 Mon Sep 17 00:00:00 2001 From: "Daniel J. Beutel" Date: Mon, 5 Feb 2024 13:22:32 +0100 Subject: [PATCH 3/6] Add Flower 1.7 release notes (#2901) --- doc/source/ref-changelog.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/source/ref-changelog.md b/doc/source/ref-changelog.md index 3e9a49977b76..c5636ce6ba49 100644 --- a/doc/source/ref-changelog.md +++ b/doc/source/ref-changelog.md @@ -1,6 +1,12 @@ # Changelog -## Unreleased +## v1.7.0 (2024-02-05) + +### 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): + +`Aasheesh Singh`, `Adam Narozniak`, `Aml Hassan Esmil`, `Charles Beauville`, `Daniel J. Beutel`, `Daniel Nata Nugraha`, `Edoardo Gabrielli`, `Gustavo Bertoli`, `HelinLin`, `Heng Pan`, `Javier`, `M S Chaitanya Kumar`, `Mohammad Naseri`, `Nikos Vlachakis`, `Pritam Neog`, `Robert Kuska`, `Robert Steiner`, `Taner Topal`, `Yahia Salaheldin Shaaban`, `Yan Gao`, `Yasar Abbas` ### What's new? From 0c7fa3bd6e1a7f3b0e332df21dc16697c7f4d5cb Mon Sep 17 00:00:00 2001 From: Charles Beauville Date: Mon, 5 Feb 2024 14:45:06 +0100 Subject: [PATCH 4/6] Use `dist` directory when publishing via CI (#2903) --- .github/workflows/framework-release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/framework-release.yml b/.github/workflows/framework-release.yml index 0f3cda8abae3..f052d3a4a928 100644 --- a/.github/workflows/framework-release.yml +++ b/.github/workflows/framework-release.yml @@ -34,7 +34,9 @@ jobs: wheel_url="https://artifact.flower.dev/py/release/v${TAG_NAME}/${wheel_name}" tar_url="https://artifact.flower.dev/py/release/v${TAG_NAME}/${tar_name}" - curl $wheel_url --output $wheel_name - curl $tar_url --output $tar_name + mkdir -p dist + + curl $wheel_url --output dist/$wheel_name + curl $tar_url --output dist/$tar_name python -m poetry publish -u __token__ -p ${{ secrets.PYPI_TOKEN }} From a8eebdeef149b95d276830f2407081baf66b3156 Mon Sep 17 00:00:00 2001 From: "Daniel J. Beutel" Date: Mon, 5 Feb 2024 14:58:04 +0100 Subject: [PATCH 5/6] Update version to 1.8.0 (#2902) --- doc/locales/pt_BR/LC_MESSAGES/framework-docs.po | 4 ++-- doc/locales/zh_Hans/LC_MESSAGES/framework-docs.po | 4 ++-- doc/source/conf.py | 2 +- ...ntributor-how-to-install-development-versions.rst | 8 ++++---- doc/source/ref-changelog.md | 12 +++++++++--- examples/doc/source/conf.py | 2 +- examples/flower-via-docker-compose/requirements.txt | 2 +- examples/xgboost-quickstart/pyproject.toml | 2 +- examples/xgboost-quickstart/requirements.txt | 2 +- pyproject.toml | 2 +- 10 files changed, 23 insertions(+), 17 deletions(-) diff --git a/doc/locales/pt_BR/LC_MESSAGES/framework-docs.po b/doc/locales/pt_BR/LC_MESSAGES/framework-docs.po index c61dcd5d6c0d..1dd6a27fe17e 100644 --- a/doc/locales/pt_BR/LC_MESSAGES/framework-docs.po +++ b/doc/locales/pt_BR/LC_MESSAGES/framework-docs.po @@ -518,13 +518,13 @@ msgid "" msgstr "" #: ../../source/contributor-how-to-install-development-versions.rst:62 -msgid "Upload the whl (e.g., ``flwr-1.6.0-py3-none-any.whl``)" +msgid "Upload the whl (e.g., ``flwr-1.7.0-py3-none-any.whl``)" msgstr "" #: ../../source/contributor-how-to-install-development-versions.rst:63 msgid "" "Change ``!pip install -q 'flwr[simulation]' torch torchvision " -"matplotlib`` to ``!pip install -q 'flwr-1.6.0-py3-none-" +"matplotlib`` to ``!pip install -q 'flwr-1.7.0-py3-none-" "any.whl[simulation]' torch torchvision matplotlib``" msgstr "" diff --git a/doc/locales/zh_Hans/LC_MESSAGES/framework-docs.po b/doc/locales/zh_Hans/LC_MESSAGES/framework-docs.po index 8a80efee2829..8e57cbfda0c0 100644 --- a/doc/locales/zh_Hans/LC_MESSAGES/framework-docs.po +++ b/doc/locales/zh_Hans/LC_MESSAGES/framework-docs.po @@ -519,13 +519,13 @@ msgid "" msgstr "" #: ../../source/contributor-how-to-install-development-versions.rst:62 -msgid "Upload the whl (e.g., ``flwr-1.6.0-py3-none-any.whl``)" +msgid "Upload the whl (e.g., ``flwr-1.7.0-py3-none-any.whl``)" msgstr "" #: ../../source/contributor-how-to-install-development-versions.rst:63 msgid "" "Change ``!pip install -q 'flwr[simulation]' torch torchvision " -"matplotlib`` to ``!pip install -q 'flwr-1.6.0-py3-none-" +"matplotlib`` to ``!pip install -q 'flwr-1.7.0-py3-none-" "any.whl[simulation]' torch torchvision matplotlib``" msgstr "" diff --git a/doc/source/conf.py b/doc/source/conf.py index 503f76cb9eca..dfb11ee37a46 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -86,7 +86,7 @@ author = "The Flower Authors" # The full version, including alpha/beta/rc tags -release = "1.7.0" +release = "1.8.0" # -- General configuration --------------------------------------------------- diff --git a/doc/source/contributor-how-to-install-development-versions.rst b/doc/source/contributor-how-to-install-development-versions.rst index 243f4ef97e8e..558ec7f8ec46 100644 --- a/doc/source/contributor-how-to-install-development-versions.rst +++ b/doc/source/contributor-how-to-install-development-versions.rst @@ -19,8 +19,8 @@ Install ``flwr`` from a local copy of the Flower source code via ``pyproject.tom Install ``flwr`` from a local wheel file via ``pyproject.toml``: -- ``flwr = { path = "../../dist/flwr-1.0.0-py3-none-any.whl" }`` (without extras) -- ``flwr = { path = "../../dist/flwr-1.0.0-py3-none-any.whl", extras = ["simulation"] }`` (with extras) +- ``flwr = { path = "../../dist/flwr-1.8.0-py3-none-any.whl" }`` (without extras) +- ``flwr = { path = "../../dist/flwr-1.8.0-py3-none-any.whl", extras = ["simulation"] }`` (with extras) Please refer to the Poetry documentation for further details: `Poetry Dependency Specification `_ @@ -59,5 +59,5 @@ Open a development version of the same notebook from branch `branch-name` by cha Install a `whl` on Google Colab: 1. In the vertical icon grid on the left hand side, select ``Files`` > ``Upload to session storage`` -2. Upload the whl (e.g., ``flwr-1.7.0-py3-none-any.whl``) -3. Change ``!pip install -q 'flwr[simulation]' torch torchvision matplotlib`` to ``!pip install -q 'flwr-1.7.0-py3-none-any.whl[simulation]' torch torchvision matplotlib`` +2. Upload the whl (e.g., ``flwr-1.8.0-py3-none-any.whl``) +3. Change ``!pip install -q 'flwr[simulation]' torch torchvision matplotlib`` to ``!pip install -q 'flwr-1.8.0-py3-none-any.whl[simulation]' torch torchvision matplotlib`` diff --git a/doc/source/ref-changelog.md b/doc/source/ref-changelog.md index c5636ce6ba49..78d1e0e491a4 100644 --- a/doc/source/ref-changelog.md +++ b/doc/source/ref-changelog.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### What's new? + +### Incompatible changes + ## v1.7.0 (2024-02-05) ### Thanks to our contributors @@ -48,7 +54,7 @@ We would like to give our special thanks to all the contributors who made the ne Several code examples were updated to use [Flower Datasets](https://flower.dev/docs/datasets/). -- **General updates to Flower Examples** ([#2381](https://github.com/adap/flower/pull/2381), [2805](https://github.com/adap/flower/pull/2805), [2782](https://github.com/adap/flower/pull/2782), [2806](https://github.com/adap/flower/pull/2806), [2829](https://github.com/adap/flower/pull/2829), [2825](https://github.com/adap/flower/pull/2825), [2816](https://github.com/adap/flower/pull/2816), [#2726](https://github.com/adap/flower/pull/2726), [#2659](https://github.com/adap/flower/pull/2659), [#2655](https://github.com/adap/flower/pull/2655)) +- **General updates to Flower Examples** ([#2381](https://github.com/adap/flower/pull/2381), [#2805](https://github.com/adap/flower/pull/2805), [#2782](https://github.com/adap/flower/pull/2782), [#2806](https://github.com/adap/flower/pull/2806), [#2829](https://github.com/adap/flower/pull/2829), [#2825](https://github.com/adap/flower/pull/2825), [#2816](https://github.com/adap/flower/pull/2816), [#2726](https://github.com/adap/flower/pull/2726), [#2659](https://github.com/adap/flower/pull/2659), [#2655](https://github.com/adap/flower/pull/2655)) Many Flower code examples received substantial updates. @@ -69,7 +75,7 @@ We would like to give our special thanks to all the contributors who made the ne - **Update dependencies** ([#2753](https://github.com/adap/flower/pull/2753), [#2651](https://github.com/adap/flower/pull/2651), [#2739](https://github.com/adap/flower/pull/2739), [#2837](https://github.com/adap/flower/pull/2837), [#2788](https://github.com/adap/flower/pull/2788), [#2811](https://github.com/adap/flower/pull/2811), [#2774](https://github.com/adap/flower/pull/2774), [#2790](https://github.com/adap/flower/pull/2790), [#2751](https://github.com/adap/flower/pull/2751), [#2850](https://github.com/adap/flower/pull/2850), [#2812](https://github.com/adap/flower/pull/2812), [#2872](https://github.com/adap/flower/pull/2872), [#2736](https://github.com/adap/flower/pull/2736), [#2756](https://github.com/adap/flower/pull/2756), [#2857](https://github.com/adap/flower/pull/2857), [#2757](https://github.com/adap/flower/pull/2757), [#2810](https://github.com/adap/flower/pull/2810), [#2740](https://github.com/adap/flower/pull/2740), [#2789](https://github.com/adap/flower/pull/2789)) -- **General improvements** ([#2803](https://github.com/adap/flower/pull/2803), [2847](https://github.com/adap/flower/pull/2847), [2877](https://github.com/adap/flower/pull/2877), [2690](https://github.com/adap/flower/pull/2690), [2889](https://github.com/adap/flower/pull/2889), [2874](https://github.com/adap/flower/pull/2874), [2819](https://github.com/adap/flower/pull/2819), [2689](https://github.com/adap/flower/pull/2689), [2457](https://github.com/adap/flower/pull/2457), [2870](https://github.com/adap/flower/pull/2870), [2669](https://github.com/adap/flower/pull/2669), [2876](https://github.com/adap/flower/pull/2876), [2885](https://github.com/adap/flower/pull/2885), [2858](https://github.com/adap/flower/pull/2858), [2867](https://github.com/adap/flower/pull/2867), [2351](https://github.com/adap/flower/pull/2351), [2886](https://github.com/adap/flower/pull/2886), [2860](https://github.com/adap/flower/pull/2860), [2828](https://github.com/adap/flower/pull/2828), [2869](https://github.com/adap/flower/pull/2869), [2875](https://github.com/adap/flower/pull/2875), [2733](https://github.com/adap/flower/pull/2733), [2488](https://github.com/adap/flower/pull/2488), [2646](https://github.com/adap/flower/pull/2646), [2879](https://github.com/adap/flower/pull/2879), [2821](https://github.com/adap/flower/pull/2821), [2855](https://github.com/adap/flower/pull/2855), [2800](https://github.com/adap/flower/pull/2800), [2807](https://github.com/adap/flower/pull/2807), [2801](https://github.com/adap/flower/pull/2801), [2804](https://github.com/adap/flower/pull/2804), [2851](https://github.com/adap/flower/pull/2851), [2787](https://github.com/adap/flower/pull/2787), [2852](https://github.com/adap/flower/pull/2852), [#2672](https://github.com/adap/flower/pull/2672), [#2759](https://github.com/adap/flower/pull/2759)) +- **General improvements** ([#2803](https://github.com/adap/flower/pull/2803), [#2847](https://github.com/adap/flower/pull/2847), [#2877](https://github.com/adap/flower/pull/2877), [#2690](https://github.com/adap/flower/pull/2690), [#2889](https://github.com/adap/flower/pull/2889), [#2874](https://github.com/adap/flower/pull/2874), [#2819](https://github.com/adap/flower/pull/2819), [#2689](https://github.com/adap/flower/pull/2689), [#2457](https://github.com/adap/flower/pull/2457), [#2870](https://github.com/adap/flower/pull/2870), [#2669](https://github.com/adap/flower/pull/2669), [#2876](https://github.com/adap/flower/pull/2876), [#2885](https://github.com/adap/flower/pull/2885), [#2858](https://github.com/adap/flower/pull/2858), [#2867](https://github.com/adap/flower/pull/2867), [#2351](https://github.com/adap/flower/pull/2351), [#2886](https://github.com/adap/flower/pull/2886), [#2860](https://github.com/adap/flower/pull/2860), [#2828](https://github.com/adap/flower/pull/2828), [#2869](https://github.com/adap/flower/pull/2869), [#2875](https://github.com/adap/flower/pull/2875), [#2733](https://github.com/adap/flower/pull/2733), [#2488](https://github.com/adap/flower/pull/2488), [#2646](https://github.com/adap/flower/pull/2646), [#2879](https://github.com/adap/flower/pull/2879), [#2821](https://github.com/adap/flower/pull/2821), [#2855](https://github.com/adap/flower/pull/2855), [#2800](https://github.com/adap/flower/pull/2800), [#2807](https://github.com/adap/flower/pull/2807), [#2801](https://github.com/adap/flower/pull/2801), [#2804](https://github.com/adap/flower/pull/2804), [#2851](https://github.com/adap/flower/pull/2851), [#2787](https://github.com/adap/flower/pull/2787), [#2852](https://github.com/adap/flower/pull/2852), [#2672](https://github.com/adap/flower/pull/2672), [#2759](https://github.com/adap/flower/pull/2759)) ### Incompatible changes @@ -179,7 +185,7 @@ We would like to give our special thanks to all the contributors who made the ne - **General updates to Flower SDKs** ([#2288](https://github.com/adap/flower/pull/2288), [#2429](https://github.com/adap/flower/pull/2429), [#2555](https://github.com/adap/flower/pull/2555), [#2543](https://github.com/adap/flower/pull/2543), [#2544](https://github.com/adap/flower/pull/2544), [#2597](https://github.com/adap/flower/pull/2597), [#2623](https://github.com/adap/flower/pull/2623)) -- **General improvements** ([#2309](https://github.com/adap/flower/pull/2309), [#2310](https://github.com/adap/flower/pull/2310), [2313](https://github.com/adap/flower/pull/2313), [#2316](https://github.com/adap/flower/pull/2316), [2317](https://github.com/adap/flower/pull/2317), [#2349](https://github.com/adap/flower/pull/2349), [#2360](https://github.com/adap/flower/pull/2360), [#2402](https://github.com/adap/flower/pull/2402), [#2446](https://github.com/adap/flower/pull/2446), [#2561](https://github.com/adap/flower/pull/2561), [#2273](https://github.com/adap/flower/pull/2273), [#2267](https://github.com/adap/flower/pull/2267), [#2274](https://github.com/adap/flower/pull/2274), [#2275](https://github.com/adap/flower/pull/2275), [#2432](https://github.com/adap/flower/pull/2432), [#2251](https://github.com/adap/flower/pull/2251), [#2321](https://github.com/adap/flower/pull/2321), [#1936](https://github.com/adap/flower/pull/1936), [#2408](https://github.com/adap/flower/pull/2408), [#2413](https://github.com/adap/flower/pull/2413), [#2401](https://github.com/adap/flower/pull/2401), [#2531](https://github.com/adap/flower/pull/2531), [#2534](https://github.com/adap/flower/pull/2534), [#2535](https://github.com/adap/flower/pull/2535), [#2521](https://github.com/adap/flower/pull/2521), [#2553](https://github.com/adap/flower/pull/2553), [#2596](https://github.com/adap/flower/pull/2596)) +- **General improvements** ([#2309](https://github.com/adap/flower/pull/2309), [#2310](https://github.com/adap/flower/pull/2310), [#2313](https://github.com/adap/flower/pull/2313), [#2316](https://github.com/adap/flower/pull/2316), [#2317](https://github.com/adap/flower/pull/2317), [#2349](https://github.com/adap/flower/pull/2349), [#2360](https://github.com/adap/flower/pull/2360), [#2402](https://github.com/adap/flower/pull/2402), [#2446](https://github.com/adap/flower/pull/2446), [#2561](https://github.com/adap/flower/pull/2561), [#2273](https://github.com/adap/flower/pull/2273), [#2267](https://github.com/adap/flower/pull/2267), [#2274](https://github.com/adap/flower/pull/2274), [#2275](https://github.com/adap/flower/pull/2275), [#2432](https://github.com/adap/flower/pull/2432), [#2251](https://github.com/adap/flower/pull/2251), [#2321](https://github.com/adap/flower/pull/2321), [#1936](https://github.com/adap/flower/pull/1936), [#2408](https://github.com/adap/flower/pull/2408), [#2413](https://github.com/adap/flower/pull/2413), [#2401](https://github.com/adap/flower/pull/2401), [#2531](https://github.com/adap/flower/pull/2531), [#2534](https://github.com/adap/flower/pull/2534), [#2535](https://github.com/adap/flower/pull/2535), [#2521](https://github.com/adap/flower/pull/2521), [#2553](https://github.com/adap/flower/pull/2553), [#2596](https://github.com/adap/flower/pull/2596)) Flower received many improvements under the hood, too many to list here. diff --git a/examples/doc/source/conf.py b/examples/doc/source/conf.py index 3d629c39c7ea..608aaeaeed6b 100644 --- a/examples/doc/source/conf.py +++ b/examples/doc/source/conf.py @@ -30,7 +30,7 @@ author = "The Flower Authors" # The full version, including alpha/beta/rc tags -release = "1.7.0" +release = "1.8.0" # -- General configuration --------------------------------------------------- diff --git a/examples/flower-via-docker-compose/requirements.txt b/examples/flower-via-docker-compose/requirements.txt index 2a85546d0e18..92e0fb13b290 100644 --- a/examples/flower-via-docker-compose/requirements.txt +++ b/examples/flower-via-docker-compose/requirements.txt @@ -2,4 +2,4 @@ flwr==1.6.0 tensorflow==2.13.1 numpy==1.24.3 prometheus_client == 0.19.0 -flwr_datasets[vision] == 0.0.2 \ No newline at end of file +flwr_datasets[vision] == 0.0.2 diff --git a/examples/xgboost-quickstart/pyproject.toml b/examples/xgboost-quickstart/pyproject.toml index 7b3cbd9659a2..af0164514cf1 100644 --- a/examples/xgboost-quickstart/pyproject.toml +++ b/examples/xgboost-quickstart/pyproject.toml @@ -10,6 +10,6 @@ authors = ["The Flower Authors "] [tool.poetry.dependencies] python = ">=3.8,<3.11" -flwr = ">=1.6.0,<2.0" +flwr = ">=1.7.0,<2.0" flwr-datasets = ">=0.0.1,<1.0.0" xgboost = ">=2.0.0,<3.0.0" diff --git a/examples/xgboost-quickstart/requirements.txt b/examples/xgboost-quickstart/requirements.txt index 4ccd5587bfc3..c6949e0651c5 100644 --- a/examples/xgboost-quickstart/requirements.txt +++ b/examples/xgboost-quickstart/requirements.txt @@ -1,3 +1,3 @@ -flwr>=1.6.0, <2.0 +flwr>=1.7.0, <2.0 flwr-datasets>=0.0.1, <1.0.0 xgboost>=2.0.0, <3.0.0 diff --git a/pyproject.toml b/pyproject.toml index f121ac30f44d..2c3a265c4516 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "flwr" -version = "1.7.0" +version = "1.8.0" description = "Flower: A Friendly Federated Learning Framework" license = "Apache-2.0" authors = ["The Flower Authors "] From 54da86351cc218ab57d96f60bc7fe22dafb0416b Mon Sep 17 00:00:00 2001 From: Robert Steiner Date: Tue, 6 Feb 2024 12:13:01 +0100 Subject: [PATCH 6/6] Update flwr in docker docs and examples (#2907) --- .github/workflows/docker-client.yml | 2 +- .github/workflows/docker-server.yml | 2 +- ...contributor-how-to-build-docker-images.rst | 8 +++---- doc/source/how-to-run-flower-using-docker.rst | 22 +++++++++---------- .../requirements.txt | 6 ++--- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/docker-client.yml b/.github/workflows/docker-client.yml index 47083b258982..3c2d83596733 100644 --- a/.github/workflows/docker-client.yml +++ b/.github/workflows/docker-client.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: flwr-version: - description: "Version of Flower e.g. (1.6.0)." + description: "Version of Flower e.g. (1.7.0)." required: true type: string diff --git a/.github/workflows/docker-server.yml b/.github/workflows/docker-server.yml index f580a8e9a280..1e43715207d4 100644 --- a/.github/workflows/docker-server.yml +++ b/.github/workflows/docker-server.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: flwr-version: - description: "Version of Flower e.g. (1.6.0)." + description: "Version of Flower e.g. (1.7.0)." required: true type: string base-image-tag: diff --git a/doc/source/contributor-how-to-build-docker-images.rst b/doc/source/contributor-how-to-build-docker-images.rst index d85e48155de0..2c6c7a7ab986 100644 --- a/doc/source/contributor-how-to-build-docker-images.rst +++ b/doc/source/contributor-how-to-build-docker-images.rst @@ -98,17 +98,17 @@ Building the server image * - ``FLWR_VERSION`` - Version of Flower to be installed. - Yes - - ``1.6.0`` + - ``1.7.0`` The following example creates a server image with the official Flower base image py3.11-ubuntu22.04 -and Flower 1.6.0: +and Flower 1.7.0: .. code-block:: bash $ cd src/docker/server/ $ docker build \ --build-arg BASE_IMAGE_TAG=py3.11-ubuntu22.04 \ - --build-arg FLWR_VERSION=1.6.0 \ + --build-arg FLWR_VERSION=1.7.0 \ -t flwr_server:0.1.0 . The name of image is ``flwr_server`` and the tag ``0.1.0``. Remember that the build arguments as well @@ -125,7 +125,7 @@ the tag of your image. $ docker build \ --build-arg BASE_REPOSITORY=flwr_base \ --build-arg BASE_IMAGE_TAG=0.1.0 \ - --build-arg FLWR_VERSION=1.6.0 \ + --build-arg FLWR_VERSION=1.7.0 \ -t flwr_server:0.1.0 . After creating the image, we can test whether the image is working: diff --git a/doc/source/how-to-run-flower-using-docker.rst b/doc/source/how-to-run-flower-using-docker.rst index 27ff61c280cb..8d47dcd3f2ab 100644 --- a/doc/source/how-to-run-flower-using-docker.rst +++ b/doc/source/how-to-run-flower-using-docker.rst @@ -31,12 +31,12 @@ If you're looking to try out Flower, you can use the following command: .. code-block:: bash - $ docker run --rm -p 9091:9091 -p 9092:9092 flwr/server:1.6.0-py3.11-ubuntu22.04 \ + $ docker run --rm -p 9091:9091 -p 9092:9092 flwr/server:1.7.0-py3.11-ubuntu22.04 \ --insecure -The command will pull the Docker image with the tag ``1.6.0-py3.11-ubuntu22.04`` from Docker Hub. +The command will pull the Docker image with the tag ``1.7.0-py3.11-ubuntu22.04`` from Docker Hub. The tag contains the information which Flower, Python and Ubuntu is used. In this case, it -uses Flower 1.6.0, Python 3.11 and Ubuntu 22.04. The ``--rm`` flag tells Docker to remove +uses Flower 1.7.0, Python 3.11 and Ubuntu 22.04. The ``--rm`` flag tells Docker to remove the container after it exits. .. note:: @@ -61,7 +61,7 @@ You can use ``--help`` to view all available flags that the server supports: .. code-block:: bash - $ docker run --rm flwr/server:1.6.0-py3.11-ubuntu22.04 --help + $ docker run --rm flwr/server:1.7.0-py3.11-ubuntu22.04 --help Mounting a volume to store the state on the host system ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -75,7 +75,7 @@ flag ``--database`` to specify the name of the database file. .. code-block:: bash $ docker run --rm \ - -p 9091:9091 -p 9092:9092 -v ~/:/app/ flwr/server:1.6.0-py3.11-ubuntu22.04 \ + -p 9091:9091 -p 9092:9092 -v ~/:/app/ flwr/server:1.7.0-py3.11-ubuntu22.04 \ --insecure \ --database state.db @@ -101,7 +101,7 @@ the server with the ``--certificates`` flag. .. code-block:: bash $ docker run --rm \ - -p 9091:9091 -p 9092:9092 -v ./certificates/:/app/ flwr/server:1.6.0-py3.11-ubuntu22.04 \ + -p 9091:9091 -p 9092:9092 -v ./certificates/:/app/ flwr/server:1.7.0-py3.11-ubuntu22.04 \ --certificates ca.crt server.pem server.key Using a different Flower or Python version @@ -118,19 +118,19 @@ updates of system dependencies that should not change the functionality of Flowe want to ensure that you always use the same image, you can specify the hash of the image instead of the tag. -The following command returns the current image hash referenced by the ``server:1.6.0-py3.11-ubuntu22.04`` tag: +The following command returns the current image hash referenced by the ``server:1.7.0-py3.11-ubuntu22.04`` tag: .. code-block:: bash - $ docker inspect --format='{{index .RepoDigests 0}}' flwr/server:1.6.0-py3.11-ubuntu22.04 - flwr/server@sha256:43fc389bcb016feab2b751b2ccafc9e9a906bb0885bd92b972329801086bc017 + $ docker inspect --format='{{index .RepoDigests 0}}' flwr/server:1.7.0-py3.11-ubuntu22.04 + flwr/server@sha256:c4be5012f9d73e3022e98735a889a463bb2f4f434448ebc19c61379920b1b327 Next, we can pin the hash when running a new server container: .. code-block:: bash $ docker run \ - --rm flwr/server@sha256:43fc389bcb016feab2b751b2ccafc9e9a906bb0885bd92b972329801086bc017 \ + --rm flwr/server@sha256:c4be5012f9d73e3022e98735a889a463bb2f4f434448ebc19c61379920b1b327 \ --insecure Setting environment variables @@ -141,4 +141,4 @@ To set a variable inside a Docker container, you can use the ``-e = .. code-block:: bash $ docker run -e FLWR_TELEMETRY_ENABLED=0 \ - --rm flwr/server:1.6.0-py3.11-ubuntu22.04 --insecure + --rm flwr/server:1.7.0-py3.11-ubuntu22.04 --insecure diff --git a/examples/flower-via-docker-compose/requirements.txt b/examples/flower-via-docker-compose/requirements.txt index 92e0fb13b290..b93e5b1d9f2b 100644 --- a/examples/flower-via-docker-compose/requirements.txt +++ b/examples/flower-via-docker-compose/requirements.txt @@ -1,5 +1,5 @@ -flwr==1.6.0 -tensorflow==2.13.1 -numpy==1.24.3 +flwr==1.7.0 +tensorflow==2.13.1 +numpy==1.24.3 prometheus_client == 0.19.0 flwr_datasets[vision] == 0.0.2