Skip to content

Commit

Permalink
Merge branch 'main' into bump-vers-1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
panh99 authored Jan 31, 2025
2 parents 8ab0f22 + a958a63 commit 205b55a
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 5 deletions.
90 changes: 89 additions & 1 deletion framework/docs/source/ref-changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,94 @@
# Changelog

## Unreleased
## v1.15.0 (2025-01-31)

### 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):

`Charles Beauville`, `Chong Shen Ng`, `Daniel J. Beutel`, `Daniel Nata Nugraha`, `Haoran Jie`, `Heng Pan`, `Ivelin Ivanov`, `Javier`, `Kevin Patel`, `Mohammad Naseri`, `Pavlos Bouzinis`, `Robert Steiner` <!---TOKEN_v1.15.0-->

### What's new?

- **Enhance SuperNode authentication** ([#4767](https://github.com/adap/flower/pull/4767), [#4791](https://github.com/adap/flower/pull/4791), [#4765](https://github.com/adap/flower/pull/4765), [#4857](https://github.com/adap/flower/pull/4857), [#4867](https://github.com/adap/flower/pull/4867))

Enhances the SuperNode authentication system, making it more efficient and resilient against replay attacks. There's no longer a need to pass `--auth-superlink-private-key` and `--auth-superlink-public-key` when running the SuperLink. Additionally, Flower now enables automatic node authentication by default, preventing impersonation even when node authentication is not explicitly used. For more details, see the [documentation](https://flower.ai/docs/framework/how-to-authenticate-supernodes.html).

- **Add guide for running Flower with Deployment Engine** ([#4811](https://github.com/adap/flower/pull/4811), [#4733](https://github.com/adap/flower/pull/4733))

Introduces the [How to run Flower with Deployment Engine](https://flower.ai/docs/framework/how-to-run-flower-with-deployment-engine.html) guide, providing detailed instructions on deploying Federated Learning in production environments using the Flower Deployment Engine.

- **Add Flower Network Communication reference documentation** ([#4805](https://github.com/adap/flower/pull/4805))

Introduces the [*Flower Network Communication*](https://flower.ai/docs/framework/ref-flower-network-communication.html) documentation, which details the network connections used in a deployed Flower federated AI system.

- **Add LeRobot quickstart example** ([#4607](https://github.com/adap/flower/pull/4607), [#4816](https://github.com/adap/flower/pull/4816))

Introduces an example demonstrating federated training of a Diffusion policy on the PushT dataset using LeRobot and Flower. The dataset is partitioned with Flower Datasets, and the example runs best with a GPU. More details: [Flower LeRobot Example](https://flower.ai/docs/examples/quickstart-lerobot.html).

- **Add video tutorial to simulation documentation** ([#4768](https://github.com/adap/flower/pull/4768))

The *Flower AI Simulation 2025* tutorial series is now available on YouTube. You can watch all the videos [here](https://www.youtube.com/playlist?list=PLNG4feLHqCWkdlSrEL2xbCtGa6QBxlUZb) or via the embedded previews in the [documentation](https://flower.ai/docs/framework/how-to-run-simulations.html). The accompanying code for the tutorial can be found in the [Flower GitHub repository](https://github.com/adap/flower/tree/main/examples/flower-simulation-step-by-step-pytorch).

- **Introduce StatAvg baseline** ([#3921](https://github.com/adap/flower/pull/3921))

StatAvg mitigates non-IID feature distributions in federated learning by sharing and aggregating data statistics before training. It is compatible with any FL aggregation strategy. More details: [StatAvg baseline](https://flower.ai/docs/baselines/statavg.html).

- **Allow setting log level via environment variable** ([#4860](https://github.com/adap/flower/pull/4860), [#4880](https://github.com/adap/flower/pull/4880), [#4886](https://github.com/adap/flower/pull/4886))

Log level can now be configured using the `FLWR_LOG_LEVEL` environment variable. For example, running `FLWR_LOG_LEVEL=DEBUG flower-superlink --insecure` will set the log level to DEBUG. For more details, see the [guide](https://flower.ai/docs/framework/how-to-configure-logging.html).

- **Enable dynamic overrides for federation configuration in CLI** ([#4841](https://github.com/adap/flower/pull/4841), [#4843](https://github.com/adap/flower/pull/4843), [#4838](https://github.com/adap/flower/pull/4838))

Similar to how the `--run-config` flag allows overriding the run configuration in `flwr run`, the new `--federation-config` flag enables dynamic overrides for federation configurations. This flag is supported in all `flwr` CLI commands except `flwr build`, `flwr install`, and `flwr new`.

- **Migrate TaskIns/TaskRes to Message-based communication** ([#4311](https://github.com/adap/flower/pull/4311), [#4310](https://github.com/adap/flower/pull/4310), [#4849](https://github.com/adap/flower/pull/4849), [#4308](https://github.com/adap/flower/pull/4308), [#4307](https://github.com/adap/flower/pull/4307), [#4800](https://github.com/adap/flower/pull/4800), [#4309](https://github.com/adap/flower/pull/4309), [#4875](https://github.com/adap/flower/pull/4875), [#4874](https://github.com/adap/flower/pull/4874), [#4877](https://github.com/adap/flower/pull/4877), [#4876](https://github.com/adap/flower/pull/4876))

The Fleet API and the ServerAppIO API (formerly known as the Driver API) now use message-based communication instead of TaskIns/TaskRes, making interactions more intuitive and better aligned with their Python counterparts. This migration introduces new RPCs, such as `PullMessages`, `PushMessages`, and other message-based operations in the gRPC stack.

- **Introduce exit codes** ([#4801](https://github.com/adap/flower/pull/4801), [#4845](https://github.com/adap/flower/pull/4845))

Improves system error and help messages by introducing a dedicated `flwr_exit` function with standardized exit codes.

- **Update gRPC-related dependencies** ([#4833](https://github.com/adap/flower/pull/4833), [#4836](https://github.com/adap/flower/pull/4836), [#4887](https://github.com/adap/flower/pull/4887))

Increases the version numbers of gRPC-related dependencies. In rare cases, if you encounter pip warnings about unresolved gRPC dependencies, it may be due to residual dependencies from older Flower versions.

- **Update** `app-pytorch` **example** ([#4842](https://github.com/adap/flower/pull/4842))

The [app-pytorch example](https://flower.ai/docs/examples/app-pytorch.html) is revamped to use the low-level API.

- **Improve CLI-side user authentication** ([#4862](https://github.com/adap/flower/pull/4862), [#4861](https://github.com/adap/flower/pull/4861), [#4832](https://github.com/adap/flower/pull/4832), [#4850](https://github.com/adap/flower/pull/4850), [#4703](https://github.com/adap/flower/pull/4703), [#4885](https://github.com/adap/flower/pull/4885))

User authentication in the CLI is enhanced with better handling, configuration options, and security enforcement.

- **Ensure graceful exit for SuperLink and SuperNode** ([#4829](https://github.com/adap/flower/pull/4829), [#4846](https://github.com/adap/flower/pull/4846), [#4798](https://github.com/adap/flower/pull/4798), [#4826](https://github.com/adap/flower/pull/4826), [#4881](https://github.com/adap/flower/pull/4881), [#4797](https://github.com/adap/flower/pull/4797))

Ensures proper resource cleanup and prevents zombie subprocesses during SuperLink and SuperNode shutdown.

- **Improve documentation** ([#4380](https://github.com/adap/flower/pull/4380), [#4853](https://github.com/adap/flower/pull/4853), [#4214](https://github.com/adap/flower/pull/4214), [#4215](https://github.com/adap/flower/pull/4215), [#4863](https://github.com/adap/flower/pull/4863), [#4825](https://github.com/adap/flower/pull/4825), [#4759](https://github.com/adap/flower/pull/4759), [#4851](https://github.com/adap/flower/pull/4851), [#4779](https://github.com/adap/flower/pull/4779), [#4813](https://github.com/adap/flower/pull/4813), [#4812](https://github.com/adap/flower/pull/4812), [#4761](https://github.com/adap/flower/pull/4761), [#4859](https://github.com/adap/flower/pull/4859), [#4754](https://github.com/adap/flower/pull/4754), [#4839](https://github.com/adap/flower/pull/4839), [#4216](https://github.com/adap/flower/pull/4216), [#4852](https://github.com/adap/flower/pull/4852), [#4869](https://github.com/adap/flower/pull/4869))

Updates PyTorch device selection in the tutorial series notebook and adds two molecular datasets to the `recommended-fl-datasets` table. Additional improvements include metadata updates, translation updates, and refinements to various documentation sections.

- **Update Docker dependencies and documentation** ([#4763](https://github.com/adap/flower/pull/4763), [#4804](https://github.com/adap/flower/pull/4804), [#4762](https://github.com/adap/flower/pull/4762), [#4803](https://github.com/adap/flower/pull/4803), [#4753](https://github.com/adap/flower/pull/4753))

- **Update CI/CD** ([#4756](https://github.com/adap/flower/pull/4756), [#4834](https://github.com/adap/flower/pull/4834), [#4824](https://github.com/adap/flower/pull/4824), [#3493](https://github.com/adap/flower/pull/3493), [#4096](https://github.com/adap/flower/pull/4096), [#4807](https://github.com/adap/flower/pull/4807), [#3956](https://github.com/adap/flower/pull/3956), [#3168](https://github.com/adap/flower/pull/3168), [#4835](https://github.com/adap/flower/pull/4835), [#4884](https://github.com/adap/flower/pull/4884))

- **Bugfixes** ([#4766](https://github.com/adap/flower/pull/4766), [#4764](https://github.com/adap/flower/pull/4764), [#4795](https://github.com/adap/flower/pull/4795), [#4840](https://github.com/adap/flower/pull/4840), [#4868](https://github.com/adap/flower/pull/4868), [#4872](https://github.com/adap/flower/pull/4872), [#4890](https://github.com/adap/flower/pull/4890))

- **General improvements** ([#4748](https://github.com/adap/flower/pull/4748), [#4799](https://github.com/adap/flower/pull/4799), [#4645](https://github.com/adap/flower/pull/4645), [#4819](https://github.com/adap/flower/pull/4819), [#4755](https://github.com/adap/flower/pull/4755), [#4789](https://github.com/adap/flower/pull/4789), [#4771](https://github.com/adap/flower/pull/4771), [#4854](https://github.com/adap/flower/pull/4854), [#4796](https://github.com/adap/flower/pull/4796), [#4865](https://github.com/adap/flower/pull/4865), [#4820](https://github.com/adap/flower/pull/4820), [#4790](https://github.com/adap/flower/pull/4790), [#4821](https://github.com/adap/flower/pull/4821), [#4822](https://github.com/adap/flower/pull/4822), [#4751](https://github.com/adap/flower/pull/4751), [#4793](https://github.com/adap/flower/pull/4793), [#4871](https://github.com/adap/flower/pull/4871), [#4785](https://github.com/adap/flower/pull/4785), [#4787](https://github.com/adap/flower/pull/4787), [#4775](https://github.com/adap/flower/pull/4775), [#4783](https://github.com/adap/flower/pull/4783), [#4818](https://github.com/adap/flower/pull/4818), [#4786](https://github.com/adap/flower/pull/4786), [#4773](https://github.com/adap/flower/pull/4773), [#4772](https://github.com/adap/flower/pull/4772), [#4784](https://github.com/adap/flower/pull/4784), [#4810](https://github.com/adap/flower/pull/4810), [#4770](https://github.com/adap/flower/pull/4770), [#4870](https://github.com/adap/flower/pull/4870), [#4878](https://github.com/adap/flower/pull/4878), [#4889](https://github.com/adap/flower/pull/4889), [#4893](https://github.com/adap/flower/pull/4893))

As always, many parts of the Flower framework and quality infrastructure were improved and updated.

### Incompatible changes

- **Remove deprecated `app`/`--server` arguments from `flower-supernode`** ([#4864](https://github.com/adap/flower/pull/4864), [#4891](https://github.com/adap/flower/pull/4891))

The deprecated `app` and `--server` arguments in `flower-supernode` has been removed. Please use `--superlink` instead of `--server`.

- **Deprecate `--auth-superlink-private-key`/`--auth-superlink-public-key` arguments from `flower-superlink`** ([#4848](https://github.com/adap/flower/pull/4848))

The two arguments are no longer necessary for SuperNode authentication following the recent improvement mentioned above.

## v1.14.0 (2024-12-20)

Expand Down
5 changes: 3 additions & 2 deletions src/py/flwr/cli/ls.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def ls( # pylint: disable=too-many-locals, too-many-branches, R0913, R0917
federation, config, federation_config_overrides
)
exit_if_no_address(federation_config, "ls")

channel = None
try:
if runs and run_id is not None:
raise ValueError(
Expand Down Expand Up @@ -148,7 +148,8 @@ def ls( # pylint: disable=too-many-locals, too-many-branches, R0913, R0917
)
raise typer.Exit(code=1) from err
finally:
channel.close()
if channel:
channel.close()
except (typer.Exit, Exception) as err: # pylint: disable=broad-except
if suppress_output:
restore_output()
Expand Down
5 changes: 3 additions & 2 deletions src/py/flwr/cli/stop.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def stop( # pylint: disable=R0914
federation, config, federation_config_overrides
)
exit_if_no_address(federation_config, "stop")

channel = None
try:
auth_plugin = try_obtain_cli_auth_plugin(app, federation, federation_config)
channel = init_channel(app, federation_config, auth_plugin)
Expand All @@ -101,7 +101,8 @@ def stop( # pylint: disable=R0914
)
raise typer.Exit(code=1) from err
finally:
channel.close()
if channel:
channel.close()
except (typer.Exit, Exception) as err: # pylint: disable=broad-except
if suppress_output:
restore_output()
Expand Down

0 comments on commit 205b55a

Please sign in to comment.