Releases: adap/flower
Flower 1.25.0
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):
Chong Shen Ng, Daniel J. Beutel, Heng Pan, Javier, Mohammad Naseri, Soumik Sarker, William Lindskog, Yan Gao, sarahhfalco
What's new?
-
Track compute time and network traffic for runs (#6241, #6242, #6243, #6244, #6245, #6249, #6266, #6267, #6268, #6269, #6270, #6271, #6272, #6273, #6274, #6275, #6276, #6279)
Flower now records compute time and network traffic for a run. The run detail view shown by
flwr list --run-id <run-id>displays traffic exchanged between SuperLink and SuperNode, as well as compute time used byServerAppandClientApp. -
Refactor
flwr newto pull apps from the Flower platform (#6251, #6252, #6258, #6259, #6260, #6263, #6265, #6283, #6284, #6285, #6292, #6294, #6302)Refactors
flwr newto fetch Flower apps directly from the Flower platform (see the usage reference). This introduces new and updated quickstart examples (including NumPy and FlowerTune LLM), renames and updates existing examples, aligns CI to run against platform-backed examples, and updates related documentation and benchmark instructions. -
Migrate examples to the Message API and remove outdated Docker Compose as well as Tensorflow Privacy examples (#6232, #6233, #6238, #6297, #6304)
Migrates the scikit-learn, Vertical FL, and Opacus examples to the Message API, with the Vertical FL example also updated to use
flwr-datasets. The outdated Docker Compose and Tensorflow Privacy examples are removed. -
Improve CLI output with human-readable durations (#6277, #6296)
Updates the Flower CLI to display durations in a more human-friendly format (
xd xh xm xs), automatically selecting appropriate units instead of the previousHH:MM:SSformat. -
Update examples and baselines (#6234, #6256, #6257, #6264, #6280, #6281, #6286, #6287, #6288, #6290, #6291, #6293)
-
General improvements (#6056, #6085, #6176, #6235, #6236, #6254, #6278, #6299)
As always, many parts of the Flower framework and quality infrastructure were improved and updated.
Incompatible changes
-
Remove bundled templates from
flwr new(#6261)Removes the templates previously bundled with the Flower wheel now that
flwr newpulls apps from the Flower platform. The--frameworkand--usernameoptions are deprecated as part of this change.
Flower 1.24.0
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, Heng Pan, Javier, Patrick Foley, Robert Steiner, Yan Gao
What's new?
-
Add Python 3.13 support (#6116, #6119, #6132)
flwrnow supports Python 3.13, with CI and dataset tests updated accordingly andraybumped to ensure compatibility. -
Improve the
flwr listview (#6117)flwr listnow shows fewer details by default, while providing expanded information when using the--run-idflag. -
Extend federation commands and internal APIs (#6067, #6068, #6078, #6082, #6086, #6087, #6088, #6090, #6091, #6092, #6093, #6094, #6098, #6103, #6105, #6121, #6122, #6143, #6152, #6153, #6154, #6158, #6165, #6167)
These updates refine and extend the existing federation concept.
flwr federation showandflwr federation listnow provide clearer visibility into SuperNodes and runs in the default federation. -
Introduce unified app heartbeat mechanism (#6204, #6206, #6209, #6210, #6212, #6213, #6214, #6215, #6218, #6219, #6221, #6224, #6225, #6226, #6227)
Introduces a unified heartbeat mechanism for app processes, preventing hangs when an app process crashes without responding. The new system enables
flwr-serverappandflwr-simulationprocesses to exit more quickly when a run is stopped by theflwr stopcommand. -
Fix bugs (#6188, #6171, #6175, #6207)
Resolves issues causing occasional missing or unregistered object IDs on lower-powered machines, prevent the
flwr-serverappprocess from hanging after being stopped via the CLI, and correct thefinished_attimestamp and initial heartbeat interval for runs. -
Improve import performance (#6102)
-
Update CI workflows and development tooling (#5242, #6053, #6080, #6089, #6108, #6129, #6130, #6131, #6135, #6138, #6142, #6144, #6156, #6181, #6187, #6189)
-
Update documentation (#6115, #6081, #6110, #6137, #6146, #6169, #6179, #6228)
-
General improvements (#6077, #6083, #6084, #6095, #6097, #6100, #6101, #6109, #6114, #6123, #6127, #6139, #6140, #6150, #6151, #6157, #6159, #6160, #6162, #6164, #6172, #6173, #6174, #6180, #6190, #6191, #6192, #6193, #6196, #6197, #6198, #6199, #6200, #6202, #6203, #6205, #6208, #6211, #6222, #6223)
As always, many parts of the Flower framework and quality infrastructure were improved and updated.
Incompatible changes
-
Drop Python 3.9 support (#6118, #6136, #6147)
flwrnow requires Python 3.10 as the minimum supported version, with baselines and development scripts updated accordingly. -
Bump protobuf to 5.x (#6104)
Upgrades
protobufto>=5.29.0, ensuringflwruses the latest gRPC stack and remains compatible with TensorFlow 2.20+. Note that this version is incompatible with TensorFlow versions earlier than 2.18. -
Deprecate
flwr.server.utils.tensorboard(#6113)The
flwr.server.utils.tensorboardfunction is now deprecated, and a slow import issue occurring whentensorflowis installed has been resolved.
Flower 1.23.0
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):
Adam Tupper, Alan Yi, Alireza Ghasemi, Charles Beauville, Chong Shen Ng, Daniel Anoruo, Daniel J. Beutel, Daniel Nata Nugraha, Heng Pan, Javier, Patrick Foley, Robert Steiner, Rohat Bozyil, Yan Gao, combe4259, han97901, maviva
What's new?
-
Enable dynamic SuperNode management via Flower CLI (#5953, #5954, #5955, #5962, #5968, #5974, #5977, #5980, #5981, #5985, #5986, #5987, #5988, #5991, #5998, #6003, #6004, #6006, #6009, #6023, #6028, #6029, #6037, #6064, #6070)
-
Add migration guide for OpenFL to Flower (#5975)
Adds a migration guide to support OpenFL users as the project approaches archival. The guide explains how to transition existing OpenFL setups to Flower, providing step-by-step migration instructions.
-
Add quantum federated learning example with PennyLane (#5852)
Introduces a new example demonstrating quantum federated learning using PennyLane. This example showcases how Flower can be integrated with quantum machine learning workflows—Flower is going quantum!
-
Replace
flwr lswithflwr list(keep alias for compatibility) (#5973)The old
flwr lscommand remains available as an alias. -
Migrate examples and tutorials to Message API (#5950, #5957, #5963, #5966)
Migrates the remaining examples and tutorials, including the 30-minute Flower tutorial,
whisper,quickstart-pandas, andfederated-kaplan-meier-fitter, to the new Message API for improved consistency and maintainability. -
Refactor SuperNode lifecycle (#6051, #6052, #6060, #6061, #6063, #6069, #6073)
Refactors the SuperNode lifecycle to align with the new management flow, streamlining SuperNode registration, activation, deactivation, and unregistration.
-
Add deployment guide for multi-cluster OpenShift setups (#6001)
-
Introduce file-based ObjectStore (#6040, #6036, #6008, #6042)
-
Improve documentation (#5936, #5937, #5943, #5949, #5956, #5958, #5972, #5976, #5983, #5996, #5999, #6010, #6018, #6030)
-
Update dependencies and CI (#5932, #5941, #5944, #5964, #6014, #6020, #6021, #6022, #6024, #6026, #6032, #6035, #6055, #6065)
-
Bugfix (#5979)
-
General improvements (#5773, #5938, #5939, #5942, #5948, #5951, #5959, #5984, #5989, #5992, #6007, #6011, #6033, #6038, #6041, #6046, #6047, #6048, #6050, #6054, #6057, #6058, #6074, #6075)
As always, many parts of the Flower framework and quality infrastructure were improved and updated.
Incompatible changes
-
Remove CSV-based SuperNode authentication (#5997)
-
Rename user authentication to account authentication (#5965, #5969)
Renames "user authentication" to "account authentication" across the framework for improved clarity and consistency. This change also updates the YAML key from
auth_typetoauthn_typeto align withauthz_type. -
Deprecate
--auth-supernode-public-keyflag (#6002, #6076)The
--auth-supernode-public-keyflag inflower-supernodeis deprecated and no longer in use. The public key is now automatically derived from the--auth-supernode-private-key, simplifying configuration and reducing redundancy.
Flower 1.22.0
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, Heng Pan, Javier, Patrick Foley, William Lindskog, William Lindskog-Munzing, Yan Gao
What's new?
-
Migrate all strategies to Message API (#5845, #5850, #5851, #5867, #5884, #5894, #5904, #5905, #5908, #5913, #5914, #5915, #5917, #5919, #5920, #5931)
Migrates and implements all federated learning strategies to support the new Message API. Strategies updated or introduced include FedAvg, FedOpt and its variants (FedAdam, FedYogi, FedAdagrad), FedProx, Krum, MultiKrum, FedAvgM, FedMedian, FedTrimmedAvg, QFedAvg, and Bulyan. Differential privacy strategies were also migrated, including both fixed and adaptive clipping mechanisms on the server and client sides.
-
Migrate
flwr newtemplates to Message API (#5901, #5818, #5893, #5849, #5883)All
flwr newtemplates have been updated to use the Message API. The PyTorch template based on the legacy API is retained and explicitly marked as legacy for those who prefer or require the older approach. A new template forXGBoostis introduced. -
Revamp main tutorials to use the Message API (#5861)
The primary tutorial series has been updated to showcase the Message API. The revamped content improves alignment with recent architectural changes and enhances learning clarity. See the updated tutorial: Get started with Flower.
-
Upgrade tutorials and how-to guides to the Message API (#5862, #5877, #5891, #5895, #5896, #5897, #5898, #5906, #5912, #5916, #5921, #5922, #5923, #5924, #5927, #5928, #5925)
All framework tutorials and how-to guides have been fully migrated to the Message API. This includes quickstarts for JAX, TensorFlow, PyTorch Lightning, MLX, FastAI, Hugging Face Transformers, and XGBoost, along with comprehensive updates to guides covering strategy design, differential privacy, checkpointing, client configuration, evaluation aggregation, and stateful client implementation. These changes ensure all learning resources are up-to-date, aligned with the current architecture, and ready for developers building on the Message API.
-
Migrate and update examples to support the Message API (#5827, #5830, #5833, #5834, #5839, #5840, #5841, #5860, #5868, #5869, #5875, #5876, #5879, #5880, #5882, #5887, #5888, #5889, #5892, #5907, #5911, #5930)
Migrates a wide range of examples to the new Message API, ensuring consistency with recent framework updates. Examples updated include quickstarts (e.g., TensorFlow, PyTorch Lightning, Hugging Face, MONAI, FastAI, MLX), advanced use cases (e.g., FlowerTune for ViT and LLMs, FedRAG, FL-VAE), and specialized scenarios (e.g., XGBoost, tabular data, embedded devices, authentication, and custom mods). Enhancements also include updated variable naming, model-saving logic, readme improvements, and import path corrections for better usability and alignment with the new API.
-
Introduce experimental
flwr pullcommand (#5863)The
flwr pullFlower CLI command is the foundation for future functionality allowing for the retrieval of artifacts generated by aServerAppin a remote SuperLink. -
Improve CI/CD workflows (#5810, #5842, #5843, #5854, #5856, #5857, #5858, #5859, #5865, #5874, #5900, #5815)
-
General improvements (#5844, #5847, #5870, #5872, #5873, #5881, #5886, #5890, #5902, #5903, #5909, #5910, #5918)
As always, many parts of the Flower framework and quality infrastructure were improved and updated.
Flower 1.21.0
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, Dimitris Stripelis, Evram, Heng Pan, Javier, Robert Steiner, Yan Gao
What's new?
-
Introduce Message API strategies (#5710, #5766, #5770, #5771, #5774, #5779, #5787, #5794, #5798, #5804, #5807, #5813, #5824, #5831, #5838)
Introduces a new abstract base class
Strategythat operate onMessagereplies, mirroring the design of those operating onFitIns/FitResorEvaluateIns/EvaluteReswhile providing more versatility on the type of payloads that can be federated with Flower. The first batch ofMessage-based strategies are:FedAvg,FedOpt,FedAdam,FedAdagrad,FedYogi, and fixed-clipping Differential Privacy strategies. More will follow in subsequent releases. A migration guide has been added to help users transition their existing Flower Apps operating on the originalStrategyandNumPyClientabstractions to the Message API. -
Introduce Flower SuperExec (#5659, #5674, #5678, #5680, #5682, #5683, #5685, #5696, #5699, #5700, #5701, #5702, #5703, #5706, #5713, #5726, #5731, #5734, #5735, #5737, #5751, #5759, #5811, #5828)
SuperExec is a new component responsible for scheduling, launching, and managing app processes (e.g.,
ServerApp,ClientApp) within the Flower deployment runtime. It is automatically spawned when running a SuperLink or SuperNode in subprocess mode (default). This also introduces a token-based mechanism that improves security by assigning a unique token to each app execution. Supporting changes include new RPCs, protocol updates, plugin abstractions, and Docker image support for SuperExec. For more details, refer to the updated Flower architecture explainer. Documentation has been revised to reflect the introduction of Flower SuperExec, including guides and tutorials such as quickstart with Docker, GCP deployment, and network communication to consistently use SuperExec. -
Update quickstart-pytorch to use Message API (#5785, #5786, #5802)
The
quickstart-pytorchtutorial has been migrated to the Message API, using the newFedAvgstrategy and the newflwr newtemplate. -
New PyTorch template with Message API (#5784)
A new PyTorch template using the Message API is now available through
flwr new. -
Add OpenShift deployment guide for Flower (#5781)
Introduces a guide for deploying Flower on Red Hat OpenShift, including setup steps and configuration examples.
-
Improve Helm documentation (#5711, #5733, #5748, #5758, #5765, #5816)
Helm guide has been enhanced with additional configuration details and updated formatting. Changes include adding a parameters section, documenting how to set a custom
secretKey, updating TLS instructions for version 1.20, introducing audit logging configuration, and using SuperExec. -
Improve documentation (#5159, #5655, #5668, #5692, #5723, #5738, #5739, #5740, #5753, #5764, #5769, #5775, #5782, #5788, #5795, #5809, #5812, #5817, #5819, #5825, #5836)
Restructures the tutorial series, removes
flower-simulationreferences, and updates versioned docs to use the correctflwrversions. The framework documentation homepage now defaults to the latest stable release instead of themainbranch. -
Re-export user-facing API from
flwr.*app(#5814, #5821, #5832, #5835)The following classes are now re-exported:
- From
flwr.serverapp:ServerApp,Grid - From
flwr.clientapp:ClientApp,arrays_size_mod,message_size_mod - From
flwr.app:Array,ArrayRecord,ConfigRecord,Context,Message,MetricRecord,RecordDict
Importing these from
flwr.server,flwr.client, orflwr.commonis deprecated. Please update your imports to useflwr.serverapp,flwr.clientapp, orflwr.appinstead to ensure forward compatibility. - From
-
Add
--health-server-addressflag to Flower SuperLink/SuperNode/SuperExec (#5792) -
Update CI/CD workflows and dependencies (#5647, #5650, #5651, #5656, #5712, #5714, #5747, #5754, #5755, #5796, #5806, #5808, #5829)
-
General improvements (#5622, #5660, #5673, #5675, #5676, #5686, #5697, #5708, #5719, #5720, #5722, #5736, #5746, #5750, #5757, #5776, #5777, #5789, #5805, #5797, #5820)
As always, many parts of the Flower framework and quality infrastructure were improved and updated.
Incompatible changes
- Rename Exec API to Control API (#5663, #5665, #5667, [#5671](https://github.com/a...
Flower 1.20.0
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, Dimitris Stripelis, Heng Pan, Javier, Kumbham Ajay Goud, Robert Steiner, William Lindskog, Yan Gao
What's new?
-
Send/receive arbitrarily large models (#5552, #5550, #5600, #5611, #5614, #5551)
Flower 1.20 can send and receive arbitrarily large models like LLMs, way beyond the 2GB limit imposed by gRPC. It does so by chunking messages sent and received. The best part? This happens automatically without the user having to do anything.
-
Implement object-based messaging between SuperNode and ClientApp (#5540, #5577, #5581, #5582, #5583, #5584, #5585, #5586, #5587, #5589, #5590, #5592, #5595, #5597, #5598, #5599, #5602, #5604, #5605, #5606, #5607, #5609, #5613, #5616, #5624, #5645)
Redesigns the messaging system to enable object-based communication between the SuperNode and ClientApp, replacing the previous message-coupled design. Introduces new RPCs and enhances the
ClientAppIoand Fleet APIs to faciliate better object storage in SuperNode and decoupleObjectStorefromMessage, improving maintainability and extensibility. Several refactorings improve modularity, naming consistency, and model weight streaming. -
Refactor SuperNode to use NodeState exclusively (#5535, #5536, #5537, #5541, #5542, #5610, #5628)
Refactors SuperNode to rely solely on
NodeStatefor managing all information, decoupling internal components for improved maintainability and clearer state handling. RPCs of theClientAppIoAPI have been refactored accordingly, laying the groundwork for future concurrent ClientApps support. -
Enforce maximum size limit for FAB files (#5493)
Limits the size of FAB files to a maximum of 10MB to prevent oversized artifacts. Developers can reduce FAB size by excluding unnecessary files via the
.gitignorefile in the Flower app directory. -
Add CatBoost federated learning quickstart example (#5564)
This example shows how to use CatBoost with Flower for federated binary classification on the Adult Census Income dataset. It applies a tree-based bagging aggregation method. View the example for more details.
-
Fix Windows path issue in FAB builds (#5608)
Updates the way FAB files represent relative paths to their internal files to ensure consistency across different operating systems. This fixes an issue where a FAB built on Windows would fail integrity checks when run on UNIX-based systems (e.g., Ubuntu).
-
Add explainer for
pyproject.tomlconfiguration (#5636)Adds a guide explaining how to configure a Flower app using its
pyproject.tomlfile. The documentation is available here. -
Improve
flwr newtemplates with TOML comments and README links (#5635)Adds comments to the generated
pyproject.tomland a new section in theREADME.md, both linking to the TOML explainer. -
Warn when running Ray backend on Windows and update simulation guide (#5579)
Logs a warning when using the Ray backend for simulation on Windows. Updates the simulation guide to include a corresponding note about limited Windows support.
-
Add Helm deployment guide (#5637)
The documentation now includes a comprehensive guide for deploying Flower SuperLink and SuperNode using Helm charts. For full instructions, refer to the Helm Guide.
-
Add docs for user authentication and audit logging (#5630, #5643, #5649)
Introduces documentation for configuring user authentication (User Authentication Guide) and audit logging (Audit Logging Guide) in Flower.
-
Support gRPC health check by default (#5591)
-
Improve and update documentation (#5558, #5603, #5538, #5626, #5566, #5553, #5588, #5549, #5618, #5612, #5646)
-
General improvements (#5543, #5594, #5623, #5615, #5629, #5571, #5617, #5563, #5620, #5619, #5546, #5601, #5641, #5555, #5533, #5548, #5557, #5565, #5554, #5621, #5644, #5576, #5648)
As always, many parts of the Flower framework and quality infrastructure were improved and updated.
Incompatible changes
-
Remove non-
grpc-biditransport support from deprecatedstart_client(#5593)Drops support for non-
grpc-biditransport in the deprecatedstart_clientAPI. Pleaes useflower-supernodeinstead.
Flower 1.19.0
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):
Adam Tupper, Andrej Jovanović, Charles Beauville, Chong Shen Ng, Daniel J. Beutel, Daniel Nata Nugraha, Dimitris Stripelis, Haoran Jie, Heng Pan, Javier, Kevin Ta, Mohammad Naseri, Ragnar, Robert Steiner, William Lindskog, ashley09, dennis-grinwald, sukrucildirr
What's new?
-
Revamp messaging system with content-addressable object model (#5513, #5477, #5424, #5379, #5353, #5372, #5507, #5364, #5517, #5514, #5342, #5393, #5508, #5504, #5335, #5341, #5430, #5308, #5487, #5509, #5438, #5369, #5354, #5486, #5380, #5496, #5399, #5489, #5446, #5432, #5456, #5442, #5462, #5429, #5497, #5435, #5371, #5450, #5384, #5488, #5434, #5425, #5475, #5458, #5494, #5449, #5492, #5426, #5445, #5467, #5474, #5527)
Introduces a content-addressable messaging system that breaks messages into a tree of uniquely identified, SHA256-hashed objects. This model allows objects to be pushed and pulled efficiently, avoiding redundant uploads and enabling scalable message streaming and broadcasting. Core enhancements include the new
InflatableObjectabstraction andObjectStorefor storing and retrieving message content, withArray,Message, and*Recordclasses now inherit fromInflatableObject. New utilities and RPCs facilitate recursive object handling, ID recomputation avoidance, and safe deletion. The framework's servicers, REST, and gRPC layers were refactored to integrate this system, improving real-world deployment scalability and communication efficiency. -
Improve user authorization and access control (#5428, #5505, #5506, #5422, #5510, #5421, #5420, #5448, #5447, #5503, #5501, #5502, #5511)
Improves user authorization feature that integrates with the existing authentication protocol. When authentication is enabled, commands like
flwr ls,flwr log, andflwr stopare restricted to displaying or affecting only the runs submitted by the authenticated user. This is enforced using the Flower Account ID. Additionally, fine-grained access control can be enforced for CLI operations based on assigned roles (RBAC). -
Add Floco baseline for personalized federated learning (#4941)
Introduces Floco, a method that enhances both personalized and global model performance in non-IID cross-silo federated learning. It trains a shared solution simplex across clients, promoting collaboration among similar clients and reducing interference from dissimilar ones. Learn more in Floco Baseline Documentation.
-
Add FEMNIST support to FedProx baseline (#5290)
Adds FEMNIST dataset to FedProx with preprocessing matching the original paper—subsampling 'a'-'j' and assigning 5 classes per device. More details: FedProx Baseline Documentation
-
Upgrade StatAvg baseline to new Flower App format (#4952)
The StatAvg baseline is updated to use the new Flower App format. Changes include removing Hydra, switching to
pyproject.tomlconfigs, usingClientAppandServerApp, and saving results via a customServerclass. More details: StatAvg Baseline Documentation. -
Add guide for running Flower on Google Cloud Platform (#5327)
The documentation now includes a detailed guide on deploying and running Flower on Google Cloud Platform (GCP). It provides step-by-step instructions for managing Flower workloads in a GCP environment. For more information, refer to the official guide.
-
Implement
ServerAppheartbeat monitoring (#5228, #5370, #5358, #5332, #5322, #5324, #5230, #5325)Adds heartbeat support to
ServerAppprocesses, enabling theSuperLinkto detect crashed or terminated processes and mark them asfinished:failedwhen no final status is received. -
Extend
NodeStateto improve SuperNode state management (#5470, #5473, #5402, #5521)Extends the
NodeStateinterface and implementation to manage all SuperNode state. -
Refactor SuperNode for improved robustness and maintainability (#5398, #5397, #5443, #5410, #5411, #5469, #5419)
Ongoing refactoring of SuperNode improves modularity, simplifies client execution, removes gRPC bidirectional streaming and unused code, and centralizes connection logic. These changes align SuperNode's behavior more closely with SuperLink to make Flower the best platform for robust enterprise deployments..
-
Restructure Flower (#5465, #5476, #5460, #5409, #5408, #5396, #5389, #5392, #5461)
Reorganizes infrastructure code into dedicated submodules to improve maintainability and clarify the separation from user-facing components.
-
Improve CI/CD workflows (#5498, #5265, #5266, #5328, #5500, #5346, #5318, #5256, #5298, #5257, #5483, #5440, #5304, #5313, [#5381](https://github.com/adap/...
Flower 1.18.0
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):
Alan Silva, Andrej Jovanović, Charles Beauville, Chong Shen Ng, Chunhui XU, Daniel J. Beutel, Daniel Nata Nugraha, Dimitris Stripelis, Guanheng Liu, Gustavo Bertoli, Heng Pan, Javier, Khoa Nguyen, Mohammad Naseri, Pinji Chen, Robert Steiner, Stephane Moroso, Taner Topal, William Lindskog, Yan Gao
What's new?
-
Add support for Python 3.12 (#5238)
Python 3.12 is officially supported (Python 3.12 was in preview support since Flower 1.6). Python 3.13 support continues to be in preview until all dependencies officially support Python 3.13.
-
Enable TLS connection for
flwrCLI using CA certificates (#5227, #5237, #5253, #5254)flwrCLI now supports secure TLS connections to SuperLink instances with valid CA certificates. If no root certificates are provided, the CLI automatically uses the default CA certificates bundled with gRPC. -
Add
--versionand-Vflags to displayflwrversion (#5236)Users can run
flwr --versionorflwr -Vto print the current Flower version. The update also adds-has a shorthand for CLI help. -
Use Hugging Face
flwrlabsdatasets in FlowerTune templates (#5205)FlowerTune templates switch to use datasets hosted under the
flwrlabsorganization on Hugging Face. -
Upgrade FedBN baseline to support
flwrCLI (#5115)Refactors the FedBN baseline to use the new Flower CLI, removes Hydra, migrates configs, enables result saving, adds run instructions, and ensures stateful clients.
-
Fix bug in Shamir's secret sharing utilities affecting Secure Aggregation (#5252)
Refactors Shamir's secret sharing utilities to fix a bug impacting Secure Aggregation. Thanks to Pinji Chen and Guanheng Liu for their contributions.
-
Ensure backward compatibility for
RecordDict(#5239, #5270)The
RecordDict(formerlyRecordSet) now maintains full backward compatibility. Legacy usages ofRecordSetand its properties are supported, with deprecation warnings logged when outdated references are used. Users are encouraged to transition to the updatedRecordDictinterface promptly to avoid future issues. -
Refactor and optimize CI/CD for repository restructuring (#5202, #5176, #5200, #5203, #5210, #5166, #5214, #5212, #5209, #5199, #5204, #5201, #5191, #5167, #5248, #5268, #5251)
Improves CI/CD workflows to align with repository changes. Updates issue templates, fixes Docker and docs jobs, enhances script compatibility, adds checks, and bumps tool versions to streamline development and deployment.
-
Improve and clean up documentation (#5233, #5179, #5216, #5211, #5217, #5198, #5168, #5215, #5169, #5171, #5240, #5259)
Removes outdated content, redundant CLI flags, and unnecessary sections; updates Docker READMEs and virtual environment setup guide; and syncs translation source texts.
-
General Improvements (#5241, #5180, #5226, #5173, #5219, #5208, #5158, #5255, #5264, #5272)
As always, many parts of the Flower framework and quality infrastructure were improved and updated.
Incompatible changes
-
Restructure repository (breaking change for contributors only) (#5206, #5194, #5192, #5185, #5184, #5177, #5183, #5207, #5267, #5274)
Restructures the Flower repository by moving all framework-related code, configs, and dev tools into the
framework/subdirectory. This includes relocating all files undersrc/, dev scripts,pyproject.tomland other configs. Contributor documentation has been updated to reflect these changes.
Flower 1.17.0
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):
Aline Almeida, Charles Beauville, Chong Shen Ng, Daniel Hinjos García, Daniel J. Beutel, Daniel Nata Nugraha, Dimitris Stripelis, Heng Pan, Javier, Robert Steiner, Yan Gao
What's new?
-
Allow registration of functions for custom message types (#5093)
Enables support for custom message types in
ServerAppby allowing themessage_typefield to be set as"<action_type>.<action_name>", where<action_type>is one oftrain,evaluate, orquery, and<action_name>is a valid Python identifier. Developers can now register handler functions for these custom message types using the decorator@app.<action_type>("<action_name>"). For example, themy_echo_fnfunction is called when theServerAppsends a message withmessage_typeset to"query.echo", and theget_mean_valuefunction is called when it's"query.mean":app = ClientApp() @app.query("echo") def my_echo_fn(message: Message, context: Context): # Echo the incoming message return Message(message.content, reply_to=message) @app.query("mean") def get_mean_value(message: Message, context: Context): # Calculate the mean value mean = ... # Replace with actual computation # Wrap the result in a MetricRecord, then in a RecordDict metrics = MetricRecord({"mean": mean}) content = RecordDict({"metrics": metrics}) return Message(content, reply_to=message)
-
Rename core Message API components for clarity and consistency (#5140, #5133, #5139, #5129, #5150, #5151, #5146, #5152)
To improve clarity and ensure consistency across the Message API, the following renamings have been made:
Driver→GridRecordSet→RecordDictParametersRecord→ArrayRecordMetricsRecord→MetricRecordConfigsRecord→ConfigRecord
Backward compatibility is maintained for all the above changes, and deprecation notices have been introduced to support a smooth transition.
-
Enable seamless conversions between
ArrayRecord/Arrayand NumPy/PyTorch types (#4922, #4920)One-liner conversions are now supported between
Arrayandnumpy.ndarrayortorch.Tensor, and betweenArrayRecord(formerlyParametersRecord) and PyTorchstate_dictor a list ofnumpy.ndarray. This simplifies workflows involving model parameters and tensor data structures. Example usage includesArrayRecord(model.state_dict())andarray_record.to_torch_state_dict(). Refer to the ArrayRecord and Array documentation for details. -
Revamp message creation using
Messageconstructor (#5137, #5153)Revamps the
Messagecreation workflow by enabling direct instantiation via theMessage(...)constructor. This deprecates the previous APIs and simplifies message creation:Driver.create_message(...)→Message(...)<some_message>.create_reply(...)→Message(..., reply_to=<some_message>)
-
Stabilize low-level Message API (#5120)
With all the changes above, the stability of the low-level Message API has been significantly improved. All preview feature warnings have been removed, marking the completion of its transition out of experimental status.
-
Add node availability check to reduce wait time (#4968)
Adds a node availability check to SuperLink. If the target SuperNode is offline, SuperLink automatically generates an error reply message when the ServerApp attempts to pull the reply. This mechanism helps avoid unnecessary delays in each round caused by waiting for responses from unavailable nodes.
-
Enable extensible event logging for FleetServicer and ExecServicer (#4998, #4997, #4951, #4950, #5108)
Introduces the necessary hooks and infrastructure to support RPC event logging for
FleetServicerandExecServicer. This enables advanced auditing and observability of RPC calls made byflwr CLIusers and SuperNodes, when appropriate event log plugins are available. -
Add CareQA benchmark for medical LLM evaluation (#4966)
Adds the CareQA dataset as a new benchmark for evaluating medical knowledge in LLMs. CareQA consists of 5,621 QA pairs from official Spanish healthcare exams (2020–2024), translated to English and covering multiple disciplines. This enhances the diversity of datasets used in the Flower Medical LLM Leaderboard.
-
Fix docstrings and improve handling of Ray nodes without CPU resources (#5155, #5076, #5132)
Fixes inaccurate or outdated docstrings in
RecordDictand theFlowerClientused in FlowerTune templates, improving documentation clarity. Also adds handling for Ray nodes that report zero CPU resources, preventing potential runtime issues. -
Improve documentation and examples (#5162, #5079, #5123, #5066, #5143, #5118, #5148, #5134, #5080, #5160, #5069, #5032)
-
Update CI/CD (#5125, #5062, #5056, #5048, #5065, #5061, #5057, #5064, #5144)
-
General Improvements (#5074, #5126, #5122, #5149, #5157)
As always, many parts of the Flower framework and quality infrastructure were improved and updated.
Flower 1.16.0
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):
Alan Silva, Andrej Jovanović, Charles Beauville, Chong Shen Ng, Daniel J. Beutel, Dimitris Stripelis, Heng Pan, Javier, Kevin Ta, Li Shaoyu, Mohammad Naseri, Taner Topal, Yan Gao
What's new?
-
Enhance
RecordSetandArrayfor improved usability (#4963, #4980, #4918)RecordSetnow supports dictionary-like access, allowing interactions similar to built-in Python dictionaries. For example, instead ofrecordset.parameters_records["model"], users can simply userecordset["model"]. This enhancement maintains backward compatibility with existingrecordset.*_recordsproperties.Additionally, the
Arrayclass now acceptsnumpy.ndarrayinstances directly in its constructor, enabling instantiation with a NumPy array viaArray(your_numpy_ndarray). -
Support function-specific Flower Mods for
ClientApp(#4954, #4962)Flower Mods can now be applied to individual functions within the
ClientApprather than affecting the entire application. This allows for more granular control. The documentation has been updated to reflect these changes — please refer to How to Use Built-in Mods for details. -
Introduce
@app.lifespan()for lifecycle management (#4929, #4986)ServerAppandClientAppnow support@app.lifespan(), enabling custom enter/exit handlers for resource setup and cleanup. Throughout the entire FL training, these handlers inClientAppmay run multiple times as instances are dynamically managed. -
Add FedRAG example (#4955, #5036, #5042)
Adds a FedRAG example, integrating Federated Learning with Retrieval Augmented Generation (RAG). This approach allows Large Language Models (LLMs) to query distributed data silos without centrally aggregating the corpora, enhancing performance while preserving data privacy.
-
Upgrade FedProx baseline to a Flower App (#4937)
Updates FedProx to the a Flower App by removing Hydra, migrating configs to
pyproject.toml, usingClientAppandServerApp, integratingflwr-datasetswithDistributionPartitioner, enabling result saving, and updatingREADME.md. This baseline now supportsflwr run. -
Migrate framework to Message-based system (#4959, #4993, #4979, #4999)
The Flower framework has been fully migrated from a
TaskIns/TaskRes-based system to aMessage-based system, aligning with the user-facingMessageclass. This includes adding validator functions forMessage, introducingLinkStatemethods that operate onMessage, updatingLinkStateto useMessage-only methods, and removing theTask-related code entirely. -
Introduce event logging extension points (#4948, #5013)
Begins implementing an event logging system for SuperLink, allowing RPC calls to be logged when enabled. These changes introduce initial extension points.
-
Increase default TTL and message size (#5011, #5028)
The default TTL for messages is now 12 hours (up from 1 hour), and the gRPC message size limit has increased from 512MB to 2GB. TTL sets a hard limit on the time between the
ServerAppsending an instruction and receiving a reply from theClientApp. -
Improve documentation (#4945, #4965, #4994, #4964, #4991, #5014, #4970, #4990, #4978, #4944, #5022, #5007, #4988, #5053)
-
Update CI/CD (#4943, #4942, #4953, #4985, #4984, #5025, #4987, #4912, #5049)
-
General Improvements (#4947, #4972, #4992, #5020, #5018, #4989, #4957, #5000, #5012, #5001)
As always, many parts of the Flower framework and quality infrastructure were improved and updated.
Incompatible changes
-
Remove deprecated CLI commands (#4855)
Removes deprecated CLI commands:
flower-server-app,flower-superexec, andflower-client-app. These commands are no longer available in the framework. -
Bump minimum Python and
cryptographyversions (#4946)Bumps the minimum Python version from 3.9 to 3.9.2 and updates the
cryptographypackage from 43.0.1 to 44.0.1. This change ensures compatibility with the latest security updates and features.