Task
Exploring Flower Documentation
As a researcher interested in Federated Learning, I explore the Flower documentation, so that I can quickly get started with implementing Flower in my projects.
Success definition: Given I am on the Flower documentation landing page When I click on the 'Flower Framework' link Then I should be taken to the Flower Framework documentation page that includes tutorials and guides for implementation, and when I click on the 'Get started with Flower' link, I should see the introductory tutorial for implementing Flower with PyTorch.
Trajectory
Step 1:
Url (before/after):
https://flower.ai/
https://flower.ai/docs/
Content (before/after):
RootWebArea Flower: A Friendly Federated AI Framework, focused, url='https://flower.ai/'
[58] link Flower Flower, center=(399,44), inner_text=Flower, url='https://flower.ai/'
image Flower, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Flogo_with_text.a0ff4459.png&w=128&q=75'
navigation
[69] link Documentation, center=(540,44), url='https://flower.ai/docs/'
Show more
[70] link Blog, center=(645,44), url='https://flower.ai/blog/'
[72] button Events, center=(732,44), expanded=False, type=button
[75] link Discuss, center=(832,44), url='https://discuss.flower.ai/'
[79] link Star 5.3k, center=(1153,44), url='https://github.com/adap/flower'
[82] link Slack Join Slack, center=(1297,44), inner_text=Join Slack, url='https://flower.ai/join-slack/'
image Slack
StaticText Register or Log In
main
[102] link What's new? FlowerTune LLM Leaderboard, center=(545,168), inner_text=What's new?
FlowerTune LLM Leaderboard, url='https://flower.ai/benchmarks/llm-leaderboard/'
heading Flower A Friendly Federated AI Framework
heading A unified approach to federated learning, analytics, and evaluation. Federate any workload, any ML framework, and any programming language.
[113] link Take the tutorial, center=(479,536), url='https://flower.ai/docs/framework/tutorial-series-what-is-federated-learning.html'
paragraph
StaticText to learn federated learning
[117] link, center=(1288,377), url='https://flower.ai/benchmarks/llm-leaderboard/'
image
paragraph
StaticText Climb to the top of the
strong
StaticText FlowerTune LLM Leaderboard!
paragraph
StaticText The next Flower Monthly is scheduled for 5th Feb 16:00 UTC (08:00 SF, 11:00 NY, 16:00 LON, 17:00 CET, 21:30 IST, 00:00 北京)
[133] link Join us, center=(1514,750), url='https://flower.ai/events/flower-monthly/'
heading Users love Flower
image Afra Mashhadi, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Fafra_mashhadi.51d202c8.png&w=640&q=75'
StaticText “My Students are free to choose their FL Framework, but Flower has proven itself because it’s
StaticText difficult to get wrong!
StaticText ”
paragraph
StaticText Afra Mashhadi
paragraph
StaticText Assistant Professor at the University of Washington
image Aashish Kolluri, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Faashish_kolluri.6b040c0d.png&w=640&q=75'
StaticText “
StaticText The communications between server and clients
StaticText have been very smooth even when they were on different machines.”
paragraph
StaticText Aashish Kolluri
paragraph
StaticText PhD Student at National University of Singapore
image James Faure, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Fjames_faure.6a294a08.png&w=640&q=75'
StaticText “FL has always been a concept that has been daunting to me. It only took me 3 hours to understand it with Flower,
StaticText using the great documentation and tutorials.
StaticText ”
paragraph
StaticText James Faure
paragraph
StaticText Student Researcher at Stellenbosch University
image M S Chaitanya Kumar, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Fchaitanya_kumar.30be6725.png&w=640&q=75'
StaticText “
StaticText Flower framework was easy to understand compared to other frameworks which I have gone through;
StaticText allocating GPU's for efficient usage is really good.”
paragraph
StaticText M S Chaitanya Kumar
paragraph
StaticText Integrated M.Tech Student at University of Hyderabad
image William Lindskog, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Fwilliam_lindskog.e9d8c2ec.png&w=640&q=75'
StaticText “The simulation engine is great and
StaticText lets me run complete federated systems on my computer. It all runs very smooth and quick.
StaticText ”
paragraph
StaticText William Lindskog
paragraph
StaticText PhD Candidate at DENSO & TU Munich
link ❤️ Show more users' feedback →, url='https://flower.ai/testimonials/'
paragraph
StaticText SOME OF THE BEST ORGANIZATIONS IN THE WORLD USE FLOWER
image University of Cambridge logo, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Fcambridge_gray.33e3e163.png&w=256&q=75'
image Harvard University logo, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Fharvard_gray.feac1cda.png&w=256&q=75'
image Orange logo, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Forange_gray.61760f67.png&w=256&q=75'
image Massachusetts Institute of Technology logo, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Fmit_gray.5503036f.png&w=256&q=75'
image Samsung AI logo, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Fsamsung_gray.2c4a34b2.png&w=256&q=75'
image Technical University of Munich logo, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Ftum_gray2.47caf6a0.png&w=256&q=75'
image Siemens Healthineers logo, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Fsiemens_gray.ff12234d.png&w=256&q=75'
image University of Oxford logo, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Foxford_gray2.803bc9c1.png&w=256&q=75'
image Accenture logo, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Faccenture_gray.5b8984c5.png&w=256&q=75'
image Gachon University logo, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Fgachon_gray.b993e2c3.png&w=256&q=75'
image Banking Circle logo, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Fbakingcircle_gray.fb6f562e.png&w=256&q=75'
image National Health Service logo, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Fnhs_gray.365320c9.png&w=256&q=75'
heading Get Started
paragraph
StaticText Build your first federated learning project in two steps. Use Flower with your favorite machine learning framework to easily federated existing projects.
link PyTorch, url='https://flower.ai/docs/framework/tutorial-quickstart-pytorch.html'
link TensorFlow, url='https://flower.ai/docs/framework/tutorial-quickstart-tensorflow.html'
link HuggingFace, url='https://flower.ai/docs/framework/tutorial-quickstart-huggingface.html'
link JAX, url='https://flower.ai/docs/framework/tutorial-quickstart-jax.html'
link Pandas, url='https://flower.ai/docs/framework/tutorial-quickstart-pandas.html'
link fastai, url='https://flower.ai/docs/framework/tutorial-quickstart-fastai.html'
link PyTorch-Lightning, url='https://flower.ai/docs/framework/tutorial-quickstart-pytorch-lightning.html'
link MXNet, url='https://flower.ai/docs/framework/tutorial-quickstart-mxnet.html'
link scikitlearn, url='https://flower.ai/docs/framework/tutorial-quickstart-scikitlearn.html'
link XGBoost, url='https://flower.ai/docs/framework/tutorial-quickstart-xgboost.html'
navigation Tabs
StaticText TensorFlow
StaticText PyTorch
StaticText HuggingFace
StaticText NumPy
heading 0. Install Flower
button Copy
code
StaticText pip install flwr[simulation]
heading 1. Create Flower app
button Copy
code
StaticText flwr new
StaticText # Select TensorFlow & follow instructions
heading 2. Run Flower app
button Copy
code
StaticText flwr run .
image Flower in Industry title, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Findex_flower_in_action.265aef98.png&w=1080&q=75'
paragraph
link Federated Learning in Automotive Automotive, url='https://flower.ai/industries/automotive/'
image Federated Learning in Automotive, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Findex_auto.9d30d020.png&w=1080&q=75'
paragraph
link Federated Learning in Finance Finance, url='https://flower.ai/industries/finance/'
image Federated Learning in Finance, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Findex_finance.ecd97217.png&w=1080&q=75'
paragraph
paragraph
StaticText Federated Learning Tutorials
paragraph
StaticText This series of tutorials introduces the fundamentals of Federated Learning and how to implement it with Flower.
heading 00
image What is Federated Learning?, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2F00_fl.0d4def05.png&w=256&q=75'
paragraph
StaticText What is Federated Learning?
list
listitem
StaticText Classic Machine Learning
listitem
StaticText Challenges of Classical Machine Learning
listitem
StaticText Federated Learning
listitem
StaticText Federated Evaluation
listitem
StaticText Federated Analytics
listitem
StaticText Differential Privacy
link Start now, url='https://flower.ai/docs/framework/tutorial-series-what-is-federated-learning.html'
heading 01
image Get started with Flower, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2F01_fl.ec1695e2.png&w=256&q=75'
paragraph
StaticText Get started with Flower
list
listitem
StaticText Preparation
listitem
StaticText Step 01: Centralized Training with PyTorch
listitem
StaticText Step 02: Federated Learning with Flower
link Start now, url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html'
heading 02
image Use a federated learning strategy, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2F02_fl.8bfd4764.png&w=256&q=75'
paragraph
StaticText Use a federated learning strategy
list
listitem
StaticText Preparation
listitem
StaticText Strategy customization
listitem
StaticText Server-side parameter evaluation
listitem
StaticText Sending/receiving arbitrary values to/from clients
listitem
StaticText Scaling Federated Learning
link Start now, url='https://flower.ai/docs/framework/tutorial-series-use-a-federated-learning-strategy-pytorch.html'
heading Check out the rest of the tutorials:
list
listitem
link 03 Build a strategy from scratch, url='https://flower.ai/docs/framework/tutorial-series-build-a-strategy-from-scratch-pytorch.html'
listitem
link 04 Customize the client, url='https://flower.ai/docs/framework/tutorial-series-customize-the-client-pytorch.html'
image Code editor with Flower code, url='data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'
heading Getting Started
heading Installation Guide
paragraph
StaticText The Flower documentation has detailed instructions on what you need to install Flower and how you install it. Spoiler alert: you only need pip! Check out our installation guide.
link, url='https://flower.ai/docs/framework/how-to-install-flower.html'
heading PyTorch, TensorFlow, 🤗, ...?
paragraph
StaticText Do you use PyTorch, TensorFlow, MLX, scikit-learn, or Hugging Face? Then simply follow our quickstart examples that help you to federate your existing ML projects.
link, url='https://flower.ai/docs/framework/tutorial-quickstart-pytorch.html'
link, url='https://flower.ai/docs/framework/tutorial-quickstart-tensorflow.html'
link, url='https://flower.ai/docs/framework/tutorial-quickstart-huggingface.html'
link, url='https://flower.ai/docs/framework/tutorial-quickstart-jax.html'
link, url='https://flower.ai/docs/framework/tutorial-quickstart-pandas.html'
link, url='https://flower.ai/docs/framework/tutorial-quickstart-fastai.html'
link, url='https://flower.ai/docs/framework/tutorial-quickstart-pytorch-lightning.html'
link, url='https://flower.ai/docs/framework/tutorial-quickstart-mlx.html'
link, url='https://flower.ai/docs/framework/tutorial-quickstart-scikitlearn.html'
link, url='https://flower.ai/docs/framework/tutorial-quickstart-xgboost.html'
heading _Why Flower?
heading A unified approach to federated learning, analytics, and evaluation.
heading Scalability
paragraph
StaticText Flower was built to enable real-world systems with a large number of clients. Researchers used Flower to run workloads with tens of millions of clients.
heading ML Framework Agnostic
paragraph
StaticText Flower is compatible with most existing and future machine learning frameworks. You love Keras? Great. You prefer PyTorch? Awesome. Raw NumPy, no automatic differentiation? You rock!
heading Cloud, Mobile, Edge & Beyond
paragraph
StaticText Flower enables research on all kinds of servers and devices, including mobile. AWS, GCP, Azure, Android, iOS, Raspberry Pi, and Nvidia Jetson are all compatible with Flower.
heading Research to Production
paragraph
StaticText Flower enables ideas to start as research projects and then gradually move towards production deployment with low engineering effort and proven infrastructure.
heading Platform Independent
paragraph
StaticText Flower is interoperable with different operating systems and hardware platforms to work well in heterogeneous edge device environments.
heading Usability
paragraph
StaticText It's easy to get started. 20 lines of Python is enough to build a full federated learning system. Check the code examples to get started with your favorite framework.
heading Join the Community!
paragraph
StaticText Join us on our journey to make federated approaches available to everyone.
link Join Flower Discuss, url='https://discuss.flower.ai/'
link Slack Join Slack, url='https://flower.ai/join-slack'
image Slack
image Flower Logo, url='data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'
[538] link Star on GitHub ⭐️, center=(960,1024), url='https://github.com/adap/flower'
button Star on GitHub ⭐️
[89] span, center=(1486,44), inner_text=Register or Log In
contentinfo Footer
heading Footer
image Flower Logo, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Flogo_secondary-w-border.411ce221.png&w=64&q=75'
paragraph
StaticText Flower: The Friendly
StaticText Federated Learning Framework.
link Slack, url='https://flower.ai/join-slack/'
link LinkedIn, url='https://de.linkedin.com/company/flwrlabs'
link Twitter, url='https://twitter.com/flwrlabs'
link GitHub, url='https://github.com/adap/flower'
link YouTube, url='https://www.youtube.com/@flowerlabs'
heading Documentation
list
listitem
link Flower Framework, url='https://flower.ai/docs/framework/'
listitem
link Flower Baselines, url='https://flower.ai/docs/baselines/'
listitem
link Flower Android SDK, url='https://flower.ai/docs/android/'
listitem
link Flower iOS SDK, url='https://flower.ai/docs/ios/documentation/flwr/'
listitem
link Flower C++ SDK, url='https://github.com/adap/flower/tree/main/examples/quickstart-cpp'
listitem
link Example Projects, url='https://flower.ai/docs/examples/'
heading Events
list
listitem
link All Events, url='https://flower.ai/events/'
listitem
link Flower Monthly, url='https://flower.ai/events/flower-monthly/'
listitem
link Flower AI Summit 2025, url='https://flower.ai/events/flower-ai-summit-2025/'
listitem
link Flower AI Summit 2024, url='https://flower.ai/events/flower-ai-summit-2024/'
listitem
link Flower Summit 2023, url='https://flower.ai/events/flower-summit-2023/'
listitem
link Flower Summit 2022, url='https://flower.ai/events/flower-summit-2022/'
listitem
link Flower Summit 2021, url='https://flower.ai/events/flower-summit-2021/'
heading Other
list
listitem
link Blog, url='https://flower.ai/blog/'
listitem
link Discuss, url='https://discuss.flower.ai/'
listitem
link Careers, url='https://flower.ai/careers'
listitem
link Pilot Program, url='https://flower.ai/pilot'
listitem
link FlowerTune, url='https://flower.ai/benchmarks/llm-leaderboard/'
listitem
link Glossary, url='https://flower.ai/glossary'
listitem
link Flower Visuals, url='https://flower.ai/visuals'
listitem
link Event Calendar, url='https://calendar.google.com/calendar/u/0?cid=Y18zOWI5ODZiZDhjMmI5MTEzZDE0NmRmZTdjMmQyM2M0MjI5N2Y2ZmVlN2FjYTk5ZGY5MWUzZGJmZTcwMzc4N2I2QGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20'
heading Socials
list
listitem
link Slack, url='https://flower.ai/join-slack/'
listitem
link LinkedIn, url='https://de.linkedin.com/company/flwrlabs'
listitem
link Twitter / X, url='https://twitter.com/flwrlabs'
listitem
link GitHub, url='https://github.com/adap/flower'
listitem
link YouTube, url='https://www.youtube.com/@flowerlabs'
listitem
link bilibili, url='https://space.bilibili.com/3546373735582167'
heading Legal
list
listitem
link Imprint, url='https://flower.ai/imprint/'
listitem
link Privacy, url='https://flower.ai/privacy/'
paragraph
StaticText © 2024 Flower Labs GmbH. All rights reserved.
alert, atomic
RootWebArea Flower Documentation, focused, url='https://flower.ai/docs/'
[678] link Flower Flower, center=(399,44), inner_text=Flower, url='https://flower.ai/'
image Flower, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Flogo_with_text.a0ff4459.png&w=128&q=75'
navigation
[689] link Documentation, center=(540,44), url='https://flower.ai/docs/'
Show more
[690] link Blog, center=(645,44), url='https://flower.ai/blog/'
[692] button Events, center=(732,44), expanded=False, type=button
[695] link Discuss, center=(832,44), url='https://discuss.flower.ai/'
[699] link Star 5.3k, center=(1153,44), url='https://github.com/adap/flower'
[702] link Slack Join Slack, center=(1297,44), inner_text=Join Slack, url='https://flower.ai/join-slack/'
image Slack
StaticText Register or Log In
main
heading Documentation
paragraph
StaticText Docs for all Flower projects
[722] link Flower Framework Build, simulate, and deploy federated learning at scale with the core Flower Framework. Easily federate existing machine learning projects with the Flower Python SDK., center=(648,461), inner_text=Flower Framework
Build, simulate, and deploy federated learning at scale with the core Flower Framework. Easily federate existing machine learning projects with the Flower Python SDK., url='https://flower.ai/docs/framework/'
heading Flower Framework
paragraph
[727] link Flower Datasets Partition datasets for federated learning using framework agnostic, reproducible, and thoroughly tested flwr-datasets library., center=(1272,461), inner_text=Flower Datasets
Partition datasets for federated learning using framework agnostic, reproducible, and thoroughly tested flwr-datasets library., url='https://flower.ai/docs/datasets/'
heading Flower Datasets
paragraph
[732] link Flower Baselines Easily reproduce and build upon well-known research results with Flower Baselines., center=(648,675), inner_text=Flower Baselines
Easily reproduce and build upon well-known research results with Flower Baselines., url='https://flower.ai/docs/baselines/'
heading Flower Baselines
paragraph
[737] link Example Projects Start easily by building on top of full Flower example projects covering a wide range of ML frameworks, platforms, and scenarios., center=(1272,675), inner_text=Example Projects
Start easily by building on top of full Flower example projects covering a wide range of ML frameworks, platforms, and scenarios., url='https://flower.ai/docs/examples/'
heading Example Projects
paragraph
[742] link Flower Android SDK (coming in 2025) Under construction 🚧 Build and deploy federated learning clients at scale with Flower. Easily federate Android on-device training with the Flower Android SDK., center=(648,889), inner_text=Flower Android SDK (coming in 2025)
Under construction 🚧 Build and deploy federated learning clients at scale with Flower. Easily federate Android on-device training with the Flower Android SDK., url='https://flower.ai/docs/android/'
heading Flower Android SDK (coming in 2025)
paragraph
[747] link Flower iOS SDK (coming in 2025) Under construction 🚧 Build and deploy federated learning clients at scale with Flower. Easily federate iOS on-device training with the Flower iOS SDK., center=(1272,889), inner_text=Flower iOS SDK (coming in 2025)
Under construction 🚧 Build and deploy federated learning clients at scale with Flower. Easily federate iOS on-device training with the Flower iOS SDK., url='https://flower.ai/docs/ios/documentation/flwr/'
heading Flower iOS SDK (coming in 2025)
paragraph
link Flower C++ SDK (coming in 2025) Under construction 🚧 Federate native on-device training with the Flower C++ SDK. Code example available, full docs coming soon., url='https://github.com/adap/flower/tree/main/examples/quickstart-cpp'
[754] heading Flower C++ SDK (coming in 2025), center=(648,1072)
paragraph
[709] span, center=(1486,44), inner_text=Register or Log In
contentinfo Footer
heading Footer
image Flower Logo, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Flogo_secondary-w-border.411ce221.png&w=64&q=75'
paragraph
StaticText Flower: The Friendly
StaticText Federated Learning Framework.
link Slack, url='https://flower.ai/join-slack/'
link LinkedIn, url='https://de.linkedin.com/company/flwrlabs'
link Twitter, url='https://twitter.com/flwrlabs'
link GitHub, url='https://github.com/adap/flower'
link YouTube, url='https://www.youtube.com/@flowerlabs'
heading Documentation
list
listitem
link Flower Framework, url='https://flower.ai/docs/framework/'
listitem
link Flower Baselines, url='https://flower.ai/docs/baselines/'
listitem
link Flower Android SDK, url='https://flower.ai/docs/android/'
listitem
link Flower iOS SDK, url='https://flower.ai/docs/ios/documentation/flwr/'
listitem
link Flower C++ SDK, url='https://github.com/adap/flower/tree/main/examples/quickstart-cpp'
listitem
link Example Projects, url='https://flower.ai/docs/examples/'
heading Events
list
listitem
link All Events, url='https://flower.ai/events/'
listitem
link Flower Monthly, url='https://flower.ai/events/flower-monthly/'
listitem
link Flower AI Summit 2025, url='https://flower.ai/events/flower-ai-summit-2025/'
listitem
link Flower AI Summit 2024, url='https://flower.ai/events/flower-ai-summit-2024/'
listitem
link Flower Summit 2023, url='https://flower.ai/events/flower-summit-2023/'
listitem
link Flower Summit 2022, url='https://flower.ai/events/flower-summit-2022/'
listitem
link Flower Summit 2021, url='https://flower.ai/events/flower-summit-2021/'
heading Other
list
listitem
link Blog, url='https://flower.ai/blog/'
listitem
link Discuss, url='https://discuss.flower.ai/'
listitem
link Careers, url='https://flower.ai/careers'
listitem
link Pilot Program, url='https://flower.ai/pilot'
listitem
link FlowerTune, url='https://flower.ai/benchmarks/llm-leaderboard/'
listitem
link Glossary, url='https://flower.ai/glossary'
listitem
link Flower Visuals, url='https://flower.ai/visuals'
listitem
link Event Calendar, url='https://calendar.google.com/calendar/u/0?cid=Y18zOWI5ODZiZDhjMmI5MTEzZDE0NmRmZTdjMmQyM2M0MjI5N2Y2ZmVlN2FjYTk5ZGY5MWUzZGJmZTcwMzc4N2I2QGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20'
heading Socials
list
listitem
link Slack, url='https://flower.ai/join-slack/'
listitem
link LinkedIn, url='https://de.linkedin.com/company/flwrlabs'
listitem
link Twitter / X, url='https://twitter.com/flwrlabs'
listitem
link GitHub, url='https://github.com/adap/flower'
listitem
link YouTube, url='https://www.youtube.com/@flowerlabs'
listitem
link bilibili, url='https://space.bilibili.com/3546373735582167'
heading Legal
list
listitem
link Imprint, url='https://flower.ai/imprint/'
listitem
link Privacy, url='https://flower.ai/privacy/'
paragraph
StaticText © 2024 Flower Labs GmbH. All rights reserved.
alert, atomic
StaticText Flower Documentation
Reasoning for action: I clicked on the 'Documentation' link (element 69) because the user's goal is to explore the Flower documentation. This action is a crucial first step to navigate to the comprehensive documentation section where tutorials and guides for implementing Flower are available. It aligns with the user's intent to quickly get started with implementing Flower in their projects.
Action: click(69) # Click on the Documentation link to explore the documentation section.
Change Description: After clicking the Documentation link, the browser transitioned from the Flower homepage to the Flower Documentation page, where the main content updated to include headings and links related to different documentation sections, including the Flower Framework, Datasets, and Baselines. The overall focus shifted from the general introduction of the Flower framework to specific resources and guides on utilizing the framework.
Screenshot before:Screenshot after:---
Step 2:
Url (before/after):
https://flower.ai/docs/
https://flower.ai/docs/framework/
Content (before/after):
RootWebArea Flower Documentation, focused, url='https://flower.ai/docs/'
[678] link Flower Flower, center=(399,44), inner_text=Flower, url='https://flower.ai/'
image Flower, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Flogo_with_text.a0ff4459.png&w=128&q=75'
navigation
[689] link Documentation, center=(540,44), url='https://flower.ai/docs/'
Show more
[690] link Blog, center=(645,44), url='https://flower.ai/blog/'
[692] button Events, center=(732,44), expanded=False, type=button
[695] link Discuss, center=(832,44), url='https://discuss.flower.ai/'
[699] link Star 5.3k, center=(1153,44), url='https://github.com/adap/flower'
[702] link Slack Join Slack, center=(1297,44), inner_text=Join Slack, url='https://flower.ai/join-slack/'
image Slack
StaticText Register or Log In
main
heading Documentation
paragraph
StaticText Docs for all Flower projects
[722] link Flower Framework Build, simulate, and deploy federated learning at scale with the core Flower Framework. Easily federate existing machine learning projects with the Flower Python SDK., center=(648,461), inner_text=Flower Framework
Build, simulate, and deploy federated learning at scale with the core Flower Framework. Easily federate existing machine learning projects with the Flower Python SDK., url='https://flower.ai/docs/framework/'
heading Flower Framework
paragraph
[727] link Flower Datasets Partition datasets for federated learning using framework agnostic, reproducible, and thoroughly tested flwr-datasets library., center=(1272,461), inner_text=Flower Datasets
Partition datasets for federated learning using framework agnostic, reproducible, and thoroughly tested flwr-datasets library., url='https://flower.ai/docs/datasets/'
heading Flower Datasets
paragraph
[732] link Flower Baselines Easily reproduce and build upon well-known research results with Flower Baselines., center=(648,675), inner_text=Flower Baselines
Easily reproduce and build upon well-known research results with Flower Baselines., url='https://flower.ai/docs/baselines/'
heading Flower Baselines
paragraph
[737] link Example Projects Start easily by building on top of full Flower example projects covering a wide range of ML frameworks, platforms, and scenarios., center=(1272,675), inner_text=Example Projects
Start easily by building on top of full Flower example projects covering a wide range of ML frameworks, platforms, and scenarios., url='https://flower.ai/docs/examples/'
heading Example Projects
paragraph
[742] link Flower Android SDK (coming in 2025) Under construction 🚧 Build and deploy federated learning clients at scale with Flower. Easily federate Android on-device training with the Flower Android SDK., center=(648,889), inner_text=Flower Android SDK (coming in 2025)
Under construction 🚧 Build and deploy federated learning clients at scale with Flower. Easily federate Android on-device training with the Flower Android SDK., url='https://flower.ai/docs/android/'
heading Flower Android SDK (coming in 2025)
paragraph
[747] link Flower iOS SDK (coming in 2025) Under construction 🚧 Build and deploy federated learning clients at scale with Flower. Easily federate iOS on-device training with the Flower iOS SDK., center=(1272,889), inner_text=Flower iOS SDK (coming in 2025)
Under construction 🚧 Build and deploy federated learning clients at scale with Flower. Easily federate iOS on-device training with the Flower iOS SDK., url='https://flower.ai/docs/ios/documentation/flwr/'
heading Flower iOS SDK (coming in 2025)
paragraph
link Flower C++ SDK (coming in 2025) Under construction 🚧 Federate native on-device training with the Flower C++ SDK. Code example available, full docs coming soon., url='https://github.com/adap/flower/tree/main/examples/quickstart-cpp'
[754] heading Flower C++ SDK (coming in 2025), center=(648,1072)
paragraph
[709] span, center=(1486,44), inner_text=Register or Log In
contentinfo Footer
heading Footer
image Flower Logo, url='https://flower.ai/_next/image/?url=%2F_next%2Fstatic%2Fmedia%2Flogo_secondary-w-border.411ce221.png&w=64&q=75'
paragraph
StaticText Flower: The Friendly
StaticText Federated Learning Framework.
link Slack, url='https://flower.ai/join-slack/'
link LinkedIn, url='https://de.linkedin.com/company/flwrlabs'
link Twitter, url='https://twitter.com/flwrlabs'
link GitHub, url='https://github.com/adap/flower'
link YouTube, url='https://www.youtube.com/@flowerlabs'
heading Documentation
list
listitem
link Flower Framework, url='https://flower.ai/docs/framework/'
listitem
link Flower Baselines, url='https://flower.ai/docs/baselines/'
listitem
link Flower Android SDK, url='https://flower.ai/docs/android/'
listitem
link Flower iOS SDK, url='https://flower.ai/docs/ios/documentation/flwr/'
listitem
link Flower C++ SDK, url='https://github.com/adap/flower/tree/main/examples/quickstart-cpp'
listitem
link Example Projects, url='https://flower.ai/docs/examples/'
heading Events
list
listitem
link All Events, url='https://flower.ai/events/'
listitem
link Flower Monthly, url='https://flower.ai/events/flower-monthly/'
listitem
link Flower AI Summit 2025, url='https://flower.ai/events/flower-ai-summit-2025/'
listitem
link Flower AI Summit 2024, url='https://flower.ai/events/flower-ai-summit-2024/'
listitem
link Flower Summit 2023, url='https://flower.ai/events/flower-summit-2023/'
listitem
link Flower Summit 2022, url='https://flower.ai/events/flower-summit-2022/'
listitem
link Flower Summit 2021, url='https://flower.ai/events/flower-summit-2021/'
heading Other
list
listitem
link Blog, url='https://flower.ai/blog/'
listitem
link Discuss, url='https://discuss.flower.ai/'
listitem
link Careers, url='https://flower.ai/careers'
listitem
link Pilot Program, url='https://flower.ai/pilot'
listitem
link FlowerTune, url='https://flower.ai/benchmarks/llm-leaderboard/'
listitem
link Glossary, url='https://flower.ai/glossary'
listitem
link Flower Visuals, url='https://flower.ai/visuals'
listitem
link Event Calendar, url='https://calendar.google.com/calendar/u/0?cid=Y18zOWI5ODZiZDhjMmI5MTEzZDE0NmRmZTdjMmQyM2M0MjI5N2Y2ZmVlN2FjYTk5ZGY5MWUzZGJmZTcwMzc4N2I2QGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20'
heading Socials
list
listitem
link Slack, url='https://flower.ai/join-slack/'
listitem
link LinkedIn, url='https://de.linkedin.com/company/flwrlabs'
listitem
link Twitter / X, url='https://twitter.com/flwrlabs'
listitem
link GitHub, url='https://github.com/adap/flower'
listitem
link YouTube, url='https://www.youtube.com/@flowerlabs'
listitem
link bilibili, url='https://space.bilibili.com/3546373735582167'
heading Legal
list
listitem
link Imprint, url='https://flower.ai/imprint/'
listitem
link Privacy, url='https://flower.ai/privacy/'
paragraph
StaticText © 2024 Flower Labs GmbH. All rights reserved.
alert, atomic
StaticText Flower Documentation
RootWebArea Flower Framework, focused, url='https://flower.ai/docs/framework/'
LabelText
StaticText Hide navigation sidebar
LabelText
StaticText Hide table of contents sidebar
Show more
link Skip to content, url='https://flower.ai/docs/framework/#furo-main-content'
complementary
[87] link Logo main, center=(369,156), inner_text=main, url='https://flower.ai/docs/framework/#'
image Logo, url='https://flower.ai/docs/framework/_static/flower-logo.png'
search
[92] textbox Search, center=(369,341), contenteditable=True
heading TUTORIAL
list
listitem
[102] link What is Federated Learning?, center=(369,437), url='https://flower.ai/docs/framework/tutorial-series-what-is-federated-learning.html'
listitem
[104] link Get started with Flower, center=(369,472), url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html'
listitem
[106] link Use a federated learning strategy, center=(369,516), url='https://flower.ai/docs/framework/tutorial-series-use-a-federated-learning-strategy-pytorch.html'
listitem
[108] link Build a strategy from scratch, center=(369,560), url='https://flower.ai/docs/framework/tutorial-series-build-a-strategy-from-scratch-pytorch.html'
listitem
[110] link Customize the client, center=(369,595), url='https://flower.ai/docs/framework/tutorial-series-customize-the-client-pytorch.html'
heading QUICKSTART TUTORIALS
list
listitem
[115] link Quickstart PyTorch, center=(369,680), url='https://flower.ai/docs/framework/tutorial-quickstart-pytorch.html'
listitem
[117] link Quickstart TensorFlow, center=(369,715), url='https://flower.ai/docs/framework/tutorial-quickstart-tensorflow.html'
listitem
[119] link Quickstart MLX, center=(369,750), url='https://flower.ai/docs/framework/tutorial-quickstart-mlx.html'
listitem
[121] link Quickstart 🤗 Transformers, center=(369,785), url='https://flower.ai/docs/framework/tutorial-quickstart-huggingface.html'
listitem
[123] link Quickstart JAX, center=(369,820), url='https://flower.ai/docs/framework/tutorial-quickstart-jax.html'
listitem
[125] link Quickstart Pandas, center=(369,856), url='https://flower.ai/docs/framework/tutorial-quickstart-pandas.html'
listitem
[127] link Quickstart fastai, center=(369,891), url='https://flower.ai/docs/framework/tutorial-quickstart-fastai.html'
listitem
[129] link Quickstart PyTorch Lightning, center=(369,926), url='https://flower.ai/docs/framework/tutorial-quickstart-pytorch-lightning.html'
listitem
[131] link Quickstart scikit-learn, center=(369,961), url='https://flower.ai/docs/framework/tutorial-quickstart-scikitlearn.html'
listitem
link Quickstart XGBoost, url='https://flower.ai/docs/framework/tutorial-quickstart-xgboost.html'
listitem
link Quickstart Android, url='https://flower.ai/docs/framework/tutorial-quickstart-android.html'
listitem
link Quickstart iOS, url='https://flower.ai/docs/framework/tutorial-quickstart-ios.html'
heading HOW-TO GUIDES
list
listitem
link Install Flower, url='https://flower.ai/docs/framework/how-to-install-flower.html'
listitem
link Configure Clients, url='https://flower.ai/docs/framework/how-to-configure-clients.html'
listitem
link Design stateful ClientApps, url='https://flower.ai/docs/framework/how-to-design-stateful-clients.html'
listitem
link Use strategies, url='https://flower.ai/docs/framework/how-to-use-strategies.html'
listitem
link Implement strategies, url='https://flower.ai/docs/framework/how-to-implement-strategies.html'
listitem
link Aggregate evaluation results, url='https://flower.ai/docs/framework/how-to-aggregate-evaluation-results.html'
listitem
link Save and Load Model Checkpoints, url='https://flower.ai/docs/framework/how-to-save-and-load-model-checkpoints.html'
listitem
link Run simulations, url='https://flower.ai/docs/framework/how-to-run-simulations.html'
listitem
link Enable TLS connections, url='https://flower.ai/docs/framework/how-to-enable-tls-connections.html'
listitem
link Use Built-in Mods, url='https://flower.ai/docs/framework/how-to-use-built-in-mods.html'
listitem
link Use Differential Privacy, url='https://flower.ai/docs/framework/how-to-use-differential-privacy.html'
listitem
link Authenticate SuperNodes, url='https://flower.ai/docs/framework/how-to-authenticate-supernodes.html'
listitem
link Implement FedBN, url='https://flower.ai/docs/framework/how-to-implement-fedbn.html'
listitem
link Run Flower on Azure, url='https://flower.ai/docs/framework/how-to-run-flower-on-azure.html'
listitem
link Use CLI JSON output, url='https://flower.ai/docs/framework/how-to-use-cli-json-output.html'
listitem
link Run Flower using Docker, url='https://flower.ai/docs/framework/docker/index.html'
LabelText
StaticText Toggle navigation of Run Flower using Docker
SvgRoot
group Expand
listitem
link Upgrade to Flower 1.0, url='https://flower.ai/docs/framework/how-to-upgrade-to-flower-1.0.html'
listitem
link Upgrade to Flower 1.13, url='https://flower.ai/docs/framework/how-to-upgrade-to-flower-1.13.html'
heading EXPLANATIONS
list
listitem
link Federated evaluation, url='https://flower.ai/docs/framework/explanation-federated-evaluation.html'
listitem
link Differential Privacy, url='https://flower.ai/docs/framework/explanation-differential-privacy.html'
listitem
link Flower Architecture, url='https://flower.ai/docs/framework/explanation-flower-architecture.html'
heading API REFERENCE
list
listitem
link flwr, url='https://flower.ai/docs/framework/ref-api/flwr.html'
LabelText
StaticText Toggle navigation of flwr
SvgRoot
group Expand
list
listitem
link Flower CLI reference, url='https://flower.ai/docs/framework/ref-api-cli.html'
heading REFERENCE DOCS
list
listitem
link Example projects, url='https://flower.ai/docs/framework/ref-example-projects.html'
listitem
link Telemetry, url='https://flower.ai/docs/framework/ref-telemetry.html'
listitem
link Changelog, url='https://flower.ai/docs/framework/ref-changelog.html'
listitem
link FAQ, url='https://flower.ai/docs/framework/ref-faq.html'
heading CONTRIBUTOR TUTORIALS
list
listitem
link Contribute on GitHub, url='https://flower.ai/docs/framework/contributor-tutorial-contribute-on-github.html'
listitem
link Get started as a contributor, url='https://flower.ai/docs/framework/contributor-tutorial-get-started-as-a-contributor.html'
heading CONTRIBUTOR HOW-TO GUIDES
list
listitem
link Install development versions, url='https://flower.ai/docs/framework/contributor-how-to-install-development-versions.html'
listitem
link Set up a virtual env, url='https://flower.ai/docs/framework/contributor-how-to-set-up-a-virtual-env.html'
listitem
link Develop in VSCode Dev Containers, url='https://flower.ai/docs/framework/contributor-how-to-develop-in-vscode-dev-containers.html'
listitem
link Write documentation, url='https://flower.ai/docs/framework/contributor-how-to-write-documentation.html'
listitem
link Release Flower, url='https://flower.ai/docs/framework/contributor-how-to-release-flower.html'
listitem
link Contribute translations, url='https://flower.ai/docs/framework/contributor-how-to-contribute-translations.html'
listitem
link How to Build Docker Flower Images Locally, url='https://flower.ai/docs/framework/contributor-how-to-build-docker-images.html'
heading CONTRIBUTOR EXPLANATIONS
list
listitem
link Public and private APIs, url='https://flower.ai/docs/framework/contributor-explanation-public-and-private-apis.html'
heading CONTRIBUTOR REFERENCES
list
listitem
link Good first contributions, url='https://flower.ai/docs/framework/contributor-ref-good-first-contributions.html'
listitem
link Secure Aggregation Protocols, url='https://flower.ai/docs/framework/contributor-ref-secure-aggregation-protocols.html'
[525] LabelText, center=(369,1004), inner_text=Versions
StaticText Versions
list
listitem
ListMarker •
link v1.8.0, url='javascript:void(0);'
listitem
ListMarker •
link v1.9.0, url='javascript:void(0);'
listitem
ListMarker •
link v1.10.0, url='javascript:void(0);'
listitem
ListMarker •
link v1.11.0, url='javascript:void(0);'
listitem
ListMarker •
link v1.11.1, url='javascript:void(0);'
listitem
ListMarker •
link v1.12.0, url='javascript:void(0);'
listitem
ListMarker •
link v1.13.0, url='javascript:void(0);'
listitem
ListMarker •
link v1.13.1, url='javascript:void(0);'
listitem
ListMarker •
link v1.14.0, url='javascript:void(0);'
listitem
ListMarker •
link main, url='javascript:void(0);'
[551] link 🇬🇧, center=(276,1047), url='https://flower.ai/docs/framework/main/en/index.html'
[552] link 🇫🇷, center=(350,1047), url='https://flower.ai/docs/framework/main/fr/index.html'
[553] link 🇨🇳, center=(424,1047), url='https://flower.ai/docs/framework/main/zh_Hans/index.html'
[554] link 🇰🇷, center=(480,1047), url='https://flower.ai/docs/framework/main/ko/index.html'
[563] link View this page, center=(1323,42), title=View this page, url='https://flower.ai/docs/framework/_sources/index.rst.txt'
image
[567] button Toggle Light / Dark / Auto color theme, center=(1354,40)
SvgRoot
group Light mode
main
heading Flower Framework Documentation
paragraph
StaticText Welcome to Flower’s documentation.
[582] link Flower, center=(917,171), url='https://flower.ai/'
StaticText is a friendly federated learning framework.
heading Join the Flower Community
paragraph
StaticText The Flower Community is growing quickly - we’re a friendly group of researchers, engineers, students, professionals, academics, and other enthusiasts.
paragraph
[588] link Join us on Slack, center=(638,355), url='https://flower.ai/join-slack'
heading Flower Framework
paragraph
StaticText The user guide is targeted at researchers and developers who want to use Flower to bring existing machine learning workloads into a federated setting. One of Flower’s design goals was to make this simple. Read on to learn more.
heading Tutorials
paragraph
StaticText A learning-oriented series of federated learning tutorials, the best place to start.
heading TUTORIAL
list
listitem
ListMarker •
[603] link What is Federated Learning?, center=(702,669), url='https://flower.ai/docs/framework/tutorial-series-what-is-federated-learning.html'
listitem
ListMarker •
[605] link Get started with Flower, center=(680,696), url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html'
listitem
ListMarker •
[607] link Use a federated learning strategy, center=(725,722), url='https://flower.ai/docs/framework/tutorial-series-use-a-federated-learning-strategy-pytorch.html'
listitem
ListMarker •
[609] link Build a strategy from scratch, center=(704,749), url='https://flower.ai/docs/framework/tutorial-series-build-a-strategy-from-scratch-pytorch.html'
listitem
ListMarker •
[611] link Customize the client, center=(667,775), url='https://flower.ai/docs/framework/tutorial-series-customize-the-client-pytorch.html'
paragraph
StaticText QUICKSTART TUTORIALS:
[614] link PyTorch, center=(815,810), url='https://flower.ai/docs/framework/tutorial-quickstart-pytorch.html'
StaticText |
[616] link TensorFlow, center=(914,810), url='https://flower.ai/docs/framework/tutorial-quickstart-tensorflow.html'
StaticText |
[618] link MLX, center=(998,810), url='https://flower.ai/docs/framework/tutorial-quickstart-mlx.html'
StaticText |
[620] link 🤗 Transformers, center=(1105,810), url='https://flower.ai/docs/framework/tutorial-quickstart-huggingface.html'
StaticText |
[622] link JAX, center=(1208,810), url='https://flower.ai/docs/framework/tutorial-quickstart-jax.html'
StaticText |
[624] link Pandas, center=(1271,810), url='https://flower.ai/docs/framework/tutorial-quickstart-pandas.html'
StaticText |
[626] link fastai, center=(580,836), url='https://flower.ai/docs/framework/tutorial-quickstart-fastai.html'
StaticText |
[628] link PyTorch Lightning, center=(699,836), url='https://flower.ai/docs/framework/tutorial-quickstart-pytorch-lightning.html'
StaticText |
[630] link scikit-learn, center=(842,836), url='https://flower.ai/docs/framework/tutorial-quickstart-scikitlearn.html'
StaticText |
[632] link XGBoost, center=(945,836), url='https://flower.ai/docs/framework/tutorial-quickstart-xgboost.html'
StaticText |
[634] link Android, center=(1033,836), url='https://flower.ai/docs/framework/tutorial-quickstart-android.html'
StaticText |
[636] link iOS, center=(1100,836), url='https://flower.ai/docs/framework/tutorial-quickstart-ios.html'
paragraph
StaticText We also made video tutorials for PyTorch:
Iframe
RootWebArea Flower Tutorial | Federated Learning Quickstart with Flower and PyTorch - YouTube, url='https://www.youtube.com/embed/jOmmuzMIQ4c'
[a30] link Photo image of Flower, center=(587,935)
[a38] link Flower Tutorial | Federated Learning Quickstart with Flower and PyTorch, center=(870,935), url='https://www.youtube.com/watch?v=jOmmuzMIQ4c'
[a55] button Share, center=(1157,933), hasPopup='menu'
image
[a91] button Play, center=(879,1100)
image
generic, atomic
[a317] link Watch on YouTube, center=(641,1268), url='https://www.youtube.com/watch?v=jOmmuzMIQ4c&embeds_referring_euri=https%3A%2F%2Fflower.ai%2F'
paragraph
StaticText And TensorFlow:
Iframe
RootWebArea Flower Tutorial | Federated Learning Quickstart with Flower and TensorFlow - YouTube, url='https://www.youtube.com/embed/FGTc2TQq7VM'
[b30] link Photo image of Flower, center=(587,1377)
[b38] link Flower Tutorial | Federated Learning Quickstart with Flower and TensorFlow, center=(870,1378), url='https://www.youtube.com/watch?v=FGTc2TQq7VM'
[b55] button Share, center=(1157,1375), hasPopup='menu'
image
[b91] button Play, center=(879,1542)
image
generic, atomic
[b317] link Watch on YouTube, center=(641,1711), url='https://www.youtube.com/watch?v=FGTc2TQq7VM&embeds_referring_euri=https%3A%2F%2Fflower.ai%2F'
heading How-to guides
paragraph
StaticText Problem-oriented how-to guides show step-by-step how to achieve a specific goal.
heading HOW-TO GUIDES
list
listitem
ListMarker •
link Install Flower, url='https://flower.ai/docs/framework/how-to-install-flower.html'
listitem
ListMarker •
link Configure Clients, url='https://flower.ai/docs/framework/how-to-configure-clients.html'
listitem
ListMarker •
link Design stateful ClientApps, url='https://flower.ai/docs/framework/how-to-design-stateful-clients.html'
listitem
ListMarker •
link Use strategies, url='https://flower.ai/docs/framework/how-to-use-strategies.html'
listitem
ListMarker •
link Implement strategies, url='https://flower.ai/docs/framework/how-to-implement-strategies.html'
listitem
ListMarker •
link Aggregate evaluation results, url='https://flower.ai/docs/framework/how-to-aggregate-evaluation-results.html'
listitem
ListMarker •
link Save and Load Model Checkpoints, url='https://flower.ai/docs/framework/how-to-save-and-load-model-checkpoints.html'
listitem
ListMarker •
link Run simulations, url='https://flower.ai/docs/framework/how-to-run-simulations.html'
listitem
ListMarker •
link Enable TLS connections, url='https://flower.ai/docs/framework/how-to-enable-tls-connections.html'
listitem
ListMarker •
link Use Built-in Mods, url='https://flower.ai/docs/framework/how-to-use-built-in-mods.html'
listitem
ListMarker •
link Use Differential Privacy, url='https://flower.ai/docs/framework/how-to-use-differential-privacy.html'
listitem
ListMarker •
link Authenticate SuperNodes, url='https://flower.ai/docs/framework/how-to-authenticate-supernodes.html'
listitem
ListMarker •
link Implement FedBN, url='https://flower.ai/docs/framework/how-to-implement-fedbn.html'
listitem
ListMarker •
link Run Flower on Azure, url='https://flower.ai/docs/framework/how-to-run-flower-on-azure.html'
listitem
ListMarker •
link Use CLI JSON output, url='https://flower.ai/docs/framework/how-to-use-cli-json-output.html'
listitem
ListMarker •
link Run Flower using Docker, url='https://flower.ai/docs/framework/docker/index.html'
listitem
ListMarker •
link Upgrade to Flower 1.0, url='https://flower.ai/docs/framework/how-to-upgrade-to-flower-1.0.html'
listitem
ListMarker •
link Upgrade to Flower 1.13, url='https://flower.ai/docs/framework/how-to-upgrade-to-flower-1.13.html'
heading Explanations
paragraph
StaticText Understanding-oriented concept guides explain and discuss key topics and underlying ideas behind Flower and collaborative AI.
heading EXPLANATIONS
list
listitem
ListMarker •
link Federated evaluation, url='https://flower.ai/docs/framework/explanation-federated-evaluation.html'
listitem
ListMarker •
link Differential Privacy, url='https://flower.ai/docs/framework/explanation-differential-privacy.html'
listitem
ListMarker •
link Flower Architecture, url='https://flower.ai/docs/framework/explanation-flower-architecture.html'
heading References
paragraph
StaticText Information-oriented API reference and other reference material.
table
rowgroup
row
cell flwr
paragraph
link flwr, url='https://flower.ai/docs/framework/ref-api/flwr.html#module-flwr'
code
cell Flower main package.
paragraph
list
listitem
ListMarker •
link Flower CLI reference, url='https://flower.ai/docs/framework/ref-api-cli.html'
list
listitem
ListMarker ◦
link Basic Commands, url='https://flower.ai/docs/framework/ref-api-cli.html#basic-commands'
listitem
ListMarker ◦
link Advanced Commands, url='https://flower.ai/docs/framework/ref-api-cli.html#advanced-commands'
listitem
ListMarker ◦
link Technical Commands, url='https://flower.ai/docs/framework/ref-api-cli.html#technical-commands'
listitem
ListMarker ◦
link Deprecated Commands, url='https://flower.ai/docs/framework/ref-api-cli.html#deprecated-commands'
heading REFERENCE DOCS
list
listitem
ListMarker •
link Example projects, url='https://flower.ai/docs/framework/ref-example-projects.html'
listitem
ListMarker •
link Telemetry, url='https://flower.ai/docs/framework/ref-telemetry.html'
listitem
ListMarker •
link Changelog, url='https://flower.ai/docs/framework/ref-changelog.html'
listitem
ListMarker •
link FAQ, url='https://flower.ai/docs/framework/ref-faq.html'
heading Contributor docs
paragraph
StaticText The Flower community welcomes contributions. The following docs are intended to help along the way.
heading CONTRIBUTOR TUTORIALS
list
listitem
ListMarker •
link Contribute on GitHub, url='https://flower.ai/docs/framework/contributor-tutorial-contribute-on-github.html'
listitem
ListMarker •
link Get started as a contributor, url='https://flower.ai/docs/framework/contributor-tutorial-get-started-as-a-contributor.html'
heading CONTRIBUTOR HOW-TO GUIDES
list
listitem
ListMarker •
link Install development versions, url='https://flower.ai/docs/framework/contributor-how-to-install-development-versions.html'
listitem
ListMarker •
link Set up a virtual env, url='https://flower.ai/docs/framework/contributor-how-to-set-up-a-virtual-env.html'
listitem
ListMarker •
link Develop in VSCode Dev Containers, url='https://flower.ai/docs/framework/contributor-how-to-develop-in-vscode-dev-containers.html'
listitem
ListMarker •
link Write documentation, url='https://flower.ai/docs/framework/contributor-how-to-write-documentation.html'
listitem
ListMarker •
link Release Flower, url='https://flower.ai/docs/framework/contributor-how-to-release-flower.html'
listitem
ListMarker •
link Contribute translations, url='https://flower.ai/docs/framework/contributor-how-to-contribute-translations.html'
listitem
ListMarker •
link How to Build Docker Flower Images Locally, url='https://flower.ai/docs/framework/contributor-how-to-build-docker-images.html'
heading CONTRIBUTOR EXPLANATIONS
list
listitem
ListMarker •
link Public and private APIs, url='https://flower.ai/docs/framework/contributor-explanation-public-and-private-apis.html'
heading CONTRIBUTOR REFERENCES
list
listitem
ListMarker •
link Good first contributions, url='https://flower.ai/docs/framework/contributor-ref-good-first-contributions.html'
listitem
ListMarker •
link Secure Aggregation Protocols, url='https://flower.ai/docs/framework/contributor-ref-secure-aggregation-protocols.html'
contentinfo
link Next What is Federated Learning?, url='https://flower.ai/docs/framework/tutorial-series-what-is-federated-learning.html'
StaticText Next
SvgRoot
group Expand
StaticText Copyright © 2025 Flower Labs GmbH
StaticText Made with
link Sphinx, url='https://www.sphinx-doc.org/'
StaticText and
link @pradyunsg, url='https://pradyunsg.me/'
StaticText 's
link Furo, url='https://github.com/pradyunsg/furo'
complementary
StaticText ON THIS PAGE
list
listitem
list
listitem
[810] link Join the Flower Community, center=(1534,67), url='https://flower.ai/docs/framework/#join-the-flower-community'
listitem
[812] link Flower Framework, center=(1505,91), url='https://flower.ai/docs/framework/#flower-framework'
list
listitem
[815] link Tutorials, center=(1490,115), url='https://flower.ai/docs/framework/#tutorials'
list
listitem
[818] link How-to guides, center=(1510,139), url='https://flower.ai/docs/framework/#how-to-guides'
listitem
[820] link Explanations, center=(1505,163), url='https://flower.ai/docs/framework/#explanations'
listitem
[822] link References, center=(1499,187), url='https://flower.ai/docs/framework/#references'
list
listitem
[825] link Contributor docs, center=(1500,212), url='https://flower.ai/docs/framework/#contributor-docs'
list
Reasoning for action: Clicking on the link for 'Flower Framework' is a direct step towards accessing the specific documentation that includes tutorials and guides for implementing Flower, as specified in the user story. This action helps advance the task by providing the necessary resources to understand how to utilize Flower in projects.
Action: click(722) # Click on the Flower Framework link to explore its documentation.
Change Description: The browser navigated from the main Flower Documentation page to the Flower Framework documentation page, transitioning the content displayed to focus on tutorials, quickly start guides, how-to guides, and explanations related to the Flower Framework.
Screenshot before:Screenshot after:---
Step 3:
Url (before/after):
https://flower.ai/docs/framework/
https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html
Content (before/after):
RootWebArea Flower Framework, focused, url='https://flower.ai/docs/framework/'
LabelText
StaticText Hide navigation sidebar
LabelText
StaticText Hide table of contents sidebar
Show more
link Skip to content, url='https://flower.ai/docs/framework/#furo-main-content'
complementary
[87] link Logo main, center=(369,156), inner_text=main, url='https://flower.ai/docs/framework/#'
image Logo, url='https://flower.ai/docs/framework/_static/flower-logo.png'
search
[92] textbox Search, center=(369,341), contenteditable=True
heading TUTORIAL
list
listitem
[102] link What is Federated Learning?, center=(369,437), url='https://flower.ai/docs/framework/tutorial-series-what-is-federated-learning.html'
listitem
[104] link Get started with Flower, center=(369,472), url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html'
listitem
[106] link Use a federated learning strategy, center=(369,516), url='https://flower.ai/docs/framework/tutorial-series-use-a-federated-learning-strategy-pytorch.html'
listitem
[108] link Build a strategy from scratch, center=(369,560), url='https://flower.ai/docs/framework/tutorial-series-build-a-strategy-from-scratch-pytorch.html'
listitem
[110] link Customize the client, center=(369,595), url='https://flower.ai/docs/framework/tutorial-series-customize-the-client-pytorch.html'
heading QUICKSTART TUTORIALS
list
listitem
[115] link Quickstart PyTorch, center=(369,680), url='https://flower.ai/docs/framework/tutorial-quickstart-pytorch.html'
listitem
[117] link Quickstart TensorFlow, center=(369,715), url='https://flower.ai/docs/framework/tutorial-quickstart-tensorflow.html'
listitem
[119] link Quickstart MLX, center=(369,750), url='https://flower.ai/docs/framework/tutorial-quickstart-mlx.html'
listitem
[121] link Quickstart 🤗 Transformers, center=(369,785), url='https://flower.ai/docs/framework/tutorial-quickstart-huggingface.html'
listitem
[123] link Quickstart JAX, center=(369,820), url='https://flower.ai/docs/framework/tutorial-quickstart-jax.html'
listitem
[125] link Quickstart Pandas, center=(369,856), url='https://flower.ai/docs/framework/tutorial-quickstart-pandas.html'
listitem
[127] link Quickstart fastai, center=(369,891), url='https://flower.ai/docs/framework/tutorial-quickstart-fastai.html'
listitem
[129] link Quickstart PyTorch Lightning, center=(369,926), url='https://flower.ai/docs/framework/tutorial-quickstart-pytorch-lightning.html'
listitem
[131] link Quickstart scikit-learn, center=(369,961), url='https://flower.ai/docs/framework/tutorial-quickstart-scikitlearn.html'
listitem
link Quickstart XGBoost, url='https://flower.ai/docs/framework/tutorial-quickstart-xgboost.html'
listitem
link Quickstart Android, url='https://flower.ai/docs/framework/tutorial-quickstart-android.html'
listitem
link Quickstart iOS, url='https://flower.ai/docs/framework/tutorial-quickstart-ios.html'
heading HOW-TO GUIDES
list
listitem
link Install Flower, url='https://flower.ai/docs/framework/how-to-install-flower.html'
listitem
link Configure Clients, url='https://flower.ai/docs/framework/how-to-configure-clients.html'
listitem
link Design stateful ClientApps, url='https://flower.ai/docs/framework/how-to-design-stateful-clients.html'
listitem
link Use strategies, url='https://flower.ai/docs/framework/how-to-use-strategies.html'
listitem
link Implement strategies, url='https://flower.ai/docs/framework/how-to-implement-strategies.html'
listitem
link Aggregate evaluation results, url='https://flower.ai/docs/framework/how-to-aggregate-evaluation-results.html'
listitem
link Save and Load Model Checkpoints, url='https://flower.ai/docs/framework/how-to-save-and-load-model-checkpoints.html'
listitem
link Run simulations, url='https://flower.ai/docs/framework/how-to-run-simulations.html'
listitem
link Enable TLS connections, url='https://flower.ai/docs/framework/how-to-enable-tls-connections.html'
listitem
link Use Built-in Mods, url='https://flower.ai/docs/framework/how-to-use-built-in-mods.html'
listitem
link Use Differential Privacy, url='https://flower.ai/docs/framework/how-to-use-differential-privacy.html'
listitem
link Authenticate SuperNodes, url='https://flower.ai/docs/framework/how-to-authenticate-supernodes.html'
listitem
link Implement FedBN, url='https://flower.ai/docs/framework/how-to-implement-fedbn.html'
listitem
link Run Flower on Azure, url='https://flower.ai/docs/framework/how-to-run-flower-on-azure.html'
listitem
link Use CLI JSON output, url='https://flower.ai/docs/framework/how-to-use-cli-json-output.html'
listitem
link Run Flower using Docker, url='https://flower.ai/docs/framework/docker/index.html'
LabelText
StaticText Toggle navigation of Run Flower using Docker
SvgRoot
group Expand
listitem
link Upgrade to Flower 1.0, url='https://flower.ai/docs/framework/how-to-upgrade-to-flower-1.0.html'
listitem
link Upgrade to Flower 1.13, url='https://flower.ai/docs/framework/how-to-upgrade-to-flower-1.13.html'
heading EXPLANATIONS
list
listitem
link Federated evaluation, url='https://flower.ai/docs/framework/explanation-federated-evaluation.html'
listitem
link Differential Privacy, url='https://flower.ai/docs/framework/explanation-differential-privacy.html'
listitem
link Flower Architecture, url='https://flower.ai/docs/framework/explanation-flower-architecture.html'
heading API REFERENCE
list
listitem
link flwr, url='https://flower.ai/docs/framework/ref-api/flwr.html'
LabelText
StaticText Toggle navigation of flwr
SvgRoot
group Expand
list
listitem
link Flower CLI reference, url='https://flower.ai/docs/framework/ref-api-cli.html'
heading REFERENCE DOCS
list
listitem
link Example projects, url='https://flower.ai/docs/framework/ref-example-projects.html'
listitem
link Telemetry, url='https://flower.ai/docs/framework/ref-telemetry.html'
listitem
link Changelog, url='https://flower.ai/docs/framework/ref-changelog.html'
listitem
link FAQ, url='https://flower.ai/docs/framework/ref-faq.html'
heading CONTRIBUTOR TUTORIALS
list
listitem
link Contribute on GitHub, url='https://flower.ai/docs/framework/contributor-tutorial-contribute-on-github.html'
listitem
link Get started as a contributor, url='https://flower.ai/docs/framework/contributor-tutorial-get-started-as-a-contributor.html'
heading CONTRIBUTOR HOW-TO GUIDES
list
listitem
link Install development versions, url='https://flower.ai/docs/framework/contributor-how-to-install-development-versions.html'
listitem
link Set up a virtual env, url='https://flower.ai/docs/framework/contributor-how-to-set-up-a-virtual-env.html'
listitem
link Develop in VSCode Dev Containers, url='https://flower.ai/docs/framework/contributor-how-to-develop-in-vscode-dev-containers.html'
listitem
link Write documentation, url='https://flower.ai/docs/framework/contributor-how-to-write-documentation.html'
listitem
link Release Flower, url='https://flower.ai/docs/framework/contributor-how-to-release-flower.html'
listitem
link Contribute translations, url='https://flower.ai/docs/framework/contributor-how-to-contribute-translations.html'
listitem
link How to Build Docker Flower Images Locally, url='https://flower.ai/docs/framework/contributor-how-to-build-docker-images.html'
heading CONTRIBUTOR EXPLANATIONS
list
listitem
link Public and private APIs, url='https://flower.ai/docs/framework/contributor-explanation-public-and-private-apis.html'
heading CONTRIBUTOR REFERENCES
list
listitem
link Good first contributions, url='https://flower.ai/docs/framework/contributor-ref-good-first-contributions.html'
listitem
link Secure Aggregation Protocols, url='https://flower.ai/docs/framework/contributor-ref-secure-aggregation-protocols.html'
[525] LabelText, center=(369,1004), inner_text=Versions
StaticText Versions
list
listitem
ListMarker •
link v1.8.0, url='javascript:void(0);'
listitem
ListMarker •
link v1.9.0, url='javascript:void(0);'
listitem
ListMarker •
link v1.10.0, url='javascript:void(0);'
listitem
ListMarker •
link v1.11.0, url='javascript:void(0);'
listitem
ListMarker •
link v1.11.1, url='javascript:void(0);'
listitem
ListMarker •
link v1.12.0, url='javascript:void(0);'
listitem
ListMarker •
link v1.13.0, url='javascript:void(0);'
listitem
ListMarker •
link v1.13.1, url='javascript:void(0);'
listitem
ListMarker •
link v1.14.0, url='javascript:void(0);'
listitem
ListMarker •
link main, url='javascript:void(0);'
[551] link 🇬🇧, center=(276,1047), url='https://flower.ai/docs/framework/main/en/index.html'
[552] link 🇫🇷, center=(350,1047), url='https://flower.ai/docs/framework/main/fr/index.html'
[553] link 🇨🇳, center=(424,1047), url='https://flower.ai/docs/framework/main/zh_Hans/index.html'
[554] link 🇰🇷, center=(480,1047), url='https://flower.ai/docs/framework/main/ko/index.html'
[563] link View this page, center=(1323,42), title=View this page, url='https://flower.ai/docs/framework/_sources/index.rst.txt'
image
[567] button Toggle Light / Dark / Auto color theme, center=(1354,40)
SvgRoot
group Light mode
main
heading Flower Framework Documentation
paragraph
StaticText Welcome to Flower’s documentation.
[582] link Flower, center=(917,171), url='https://flower.ai/'
StaticText is a friendly federated learning framework.
heading Join the Flower Community
paragraph
StaticText The Flower Community is growing quickly - we’re a friendly group of researchers, engineers, students, professionals, academics, and other enthusiasts.
paragraph
[588] link Join us on Slack, center=(638,355), url='https://flower.ai/join-slack'
heading Flower Framework
paragraph
StaticText The user guide is targeted at researchers and developers who want to use Flower to bring existing machine learning workloads into a federated setting. One of Flower’s design goals was to make this simple. Read on to learn more.
heading Tutorials
paragraph
StaticText A learning-oriented series of federated learning tutorials, the best place to start.
heading TUTORIAL
list
listitem
ListMarker •
[603] link What is Federated Learning?, center=(702,669), url='https://flower.ai/docs/framework/tutorial-series-what-is-federated-learning.html'
listitem
ListMarker •
[605] link Get started with Flower, center=(680,696), url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html'
listitem
ListMarker •
[607] link Use a federated learning strategy, center=(725,722), url='https://flower.ai/docs/framework/tutorial-series-use-a-federated-learning-strategy-pytorch.html'
listitem
ListMarker •
[609] link Build a strategy from scratch, center=(704,749), url='https://flower.ai/docs/framework/tutorial-series-build-a-strategy-from-scratch-pytorch.html'
listitem
ListMarker •
[611] link Customize the client, center=(667,775), url='https://flower.ai/docs/framework/tutorial-series-customize-the-client-pytorch.html'
paragraph
StaticText QUICKSTART TUTORIALS:
[614] link PyTorch, center=(815,810), url='https://flower.ai/docs/framework/tutorial-quickstart-pytorch.html'
StaticText |
[616] link TensorFlow, center=(914,810), url='https://flower.ai/docs/framework/tutorial-quickstart-tensorflow.html'
StaticText |
[618] link MLX, center=(998,810), url='https://flower.ai/docs/framework/tutorial-quickstart-mlx.html'
StaticText |
[620] link 🤗 Transformers, center=(1105,810), url='https://flower.ai/docs/framework/tutorial-quickstart-huggingface.html'
StaticText |
[622] link JAX, center=(1208,810), url='https://flower.ai/docs/framework/tutorial-quickstart-jax.html'
StaticText |
[624] link Pandas, center=(1271,810), url='https://flower.ai/docs/framework/tutorial-quickstart-pandas.html'
StaticText |
[626] link fastai, center=(580,836), url='https://flower.ai/docs/framework/tutorial-quickstart-fastai.html'
StaticText |
[628] link PyTorch Lightning, center=(699,836), url='https://flower.ai/docs/framework/tutorial-quickstart-pytorch-lightning.html'
StaticText |
[630] link scikit-learn, center=(842,836), url='https://flower.ai/docs/framework/tutorial-quickstart-scikitlearn.html'
StaticText |
[632] link XGBoost, center=(945,836), url='https://flower.ai/docs/framework/tutorial-quickstart-xgboost.html'
StaticText |
[634] link Android, center=(1033,836), url='https://flower.ai/docs/framework/tutorial-quickstart-android.html'
StaticText |
[636] link iOS, center=(1100,836), url='https://flower.ai/docs/framework/tutorial-quickstart-ios.html'
paragraph
StaticText We also made video tutorials for PyTorch:
Iframe
RootWebArea Flower Tutorial | Federated Learning Quickstart with Flower and PyTorch - YouTube, url='https://www.youtube.com/embed/jOmmuzMIQ4c'
[a30] link Photo image of Flower, center=(587,935)
[a38] link Flower Tutorial | Federated Learning Quickstart with Flower and PyTorch, center=(870,935), url='https://www.youtube.com/watch?v=jOmmuzMIQ4c'
[a55] button Share, center=(1157,933), hasPopup='menu'
image
[a91] button Play, center=(879,1100)
image
generic, atomic
[a317] link Watch on YouTube, center=(641,1268), url='https://www.youtube.com/watch?v=jOmmuzMIQ4c&embeds_referring_euri=https%3A%2F%2Fflower.ai%2F'
paragraph
StaticText And TensorFlow:
Iframe
RootWebArea Flower Tutorial | Federated Learning Quickstart with Flower and TensorFlow - YouTube, url='https://www.youtube.com/embed/FGTc2TQq7VM'
[b30] link Photo image of Flower, center=(587,1377)
[b38] link Flower Tutorial | Federated Learning Quickstart with Flower and TensorFlow, center=(870,1378), url='https://www.youtube.com/watch?v=FGTc2TQq7VM'
[b55] button Share, center=(1157,1375), hasPopup='menu'
image
[b91] button Play, center=(879,1542)
image
generic, atomic
[b317] link Watch on YouTube, center=(641,1711), url='https://www.youtube.com/watch?v=FGTc2TQq7VM&embeds_referring_euri=https%3A%2F%2Fflower.ai%2F'
heading How-to guides
paragraph
StaticText Problem-oriented how-to guides show step-by-step how to achieve a specific goal.
heading HOW-TO GUIDES
list
listitem
ListMarker •
link Install Flower, url='https://flower.ai/docs/framework/how-to-install-flower.html'
listitem
ListMarker •
link Configure Clients, url='https://flower.ai/docs/framework/how-to-configure-clients.html'
listitem
ListMarker •
link Design stateful ClientApps, url='https://flower.ai/docs/framework/how-to-design-stateful-clients.html'
listitem
ListMarker •
link Use strategies, url='https://flower.ai/docs/framework/how-to-use-strategies.html'
listitem
ListMarker •
link Implement strategies, url='https://flower.ai/docs/framework/how-to-implement-strategies.html'
listitem
ListMarker •
link Aggregate evaluation results, url='https://flower.ai/docs/framework/how-to-aggregate-evaluation-results.html'
listitem
ListMarker •
link Save and Load Model Checkpoints, url='https://flower.ai/docs/framework/how-to-save-and-load-model-checkpoints.html'
listitem
ListMarker •
link Run simulations, url='https://flower.ai/docs/framework/how-to-run-simulations.html'
listitem
ListMarker •
link Enable TLS connections, url='https://flower.ai/docs/framework/how-to-enable-tls-connections.html'
listitem
ListMarker •
link Use Built-in Mods, url='https://flower.ai/docs/framework/how-to-use-built-in-mods.html'
listitem
ListMarker •
link Use Differential Privacy, url='https://flower.ai/docs/framework/how-to-use-differential-privacy.html'
listitem
ListMarker •
link Authenticate SuperNodes, url='https://flower.ai/docs/framework/how-to-authenticate-supernodes.html'
listitem
ListMarker •
link Implement FedBN, url='https://flower.ai/docs/framework/how-to-implement-fedbn.html'
listitem
ListMarker •
link Run Flower on Azure, url='https://flower.ai/docs/framework/how-to-run-flower-on-azure.html'
listitem
ListMarker •
link Use CLI JSON output, url='https://flower.ai/docs/framework/how-to-use-cli-json-output.html'
listitem
ListMarker •
link Run Flower using Docker, url='https://flower.ai/docs/framework/docker/index.html'
listitem
ListMarker •
link Upgrade to Flower 1.0, url='https://flower.ai/docs/framework/how-to-upgrade-to-flower-1.0.html'
listitem
ListMarker •
link Upgrade to Flower 1.13, url='https://flower.ai/docs/framework/how-to-upgrade-to-flower-1.13.html'
heading Explanations
paragraph
StaticText Understanding-oriented concept guides explain and discuss key topics and underlying ideas behind Flower and collaborative AI.
heading EXPLANATIONS
list
listitem
ListMarker •
link Federated evaluation, url='https://flower.ai/docs/framework/explanation-federated-evaluation.html'
listitem
ListMarker •
link Differential Privacy, url='https://flower.ai/docs/framework/explanation-differential-privacy.html'
listitem
ListMarker •
link Flower Architecture, url='https://flower.ai/docs/framework/explanation-flower-architecture.html'
heading References
paragraph
StaticText Information-oriented API reference and other reference material.
table
rowgroup
row
cell flwr
paragraph
link flwr, url='https://flower.ai/docs/framework/ref-api/flwr.html#module-flwr'
code
cell Flower main package.
paragraph
list
listitem
ListMarker •
link Flower CLI reference, url='https://flower.ai/docs/framework/ref-api-cli.html'
list
listitem
ListMarker ◦
link Basic Commands, url='https://flower.ai/docs/framework/ref-api-cli.html#basic-commands'
listitem
ListMarker ◦
link Advanced Commands, url='https://flower.ai/docs/framework/ref-api-cli.html#advanced-commands'
listitem
ListMarker ◦
link Technical Commands, url='https://flower.ai/docs/framework/ref-api-cli.html#technical-commands'
listitem
ListMarker ◦
link Deprecated Commands, url='https://flower.ai/docs/framework/ref-api-cli.html#deprecated-commands'
heading REFERENCE DOCS
list
listitem
ListMarker •
link Example projects, url='https://flower.ai/docs/framework/ref-example-projects.html'
listitem
ListMarker •
link Telemetry, url='https://flower.ai/docs/framework/ref-telemetry.html'
listitem
ListMarker •
link Changelog, url='https://flower.ai/docs/framework/ref-changelog.html'
listitem
ListMarker •
link FAQ, url='https://flower.ai/docs/framework/ref-faq.html'
heading Contributor docs
paragraph
StaticText The Flower community welcomes contributions. The following docs are intended to help along the way.
heading CONTRIBUTOR TUTORIALS
list
listitem
ListMarker •
link Contribute on GitHub, url='https://flower.ai/docs/framework/contributor-tutorial-contribute-on-github.html'
listitem
ListMarker •
link Get started as a contributor, url='https://flower.ai/docs/framework/contributor-tutorial-get-started-as-a-contributor.html'
heading CONTRIBUTOR HOW-TO GUIDES
list
listitem
ListMarker •
link Install development versions, url='https://flower.ai/docs/framework/contributor-how-to-install-development-versions.html'
listitem
ListMarker •
link Set up a virtual env, url='https://flower.ai/docs/framework/contributor-how-to-set-up-a-virtual-env.html'
listitem
ListMarker •
link Develop in VSCode Dev Containers, url='https://flower.ai/docs/framework/contributor-how-to-develop-in-vscode-dev-containers.html'
listitem
ListMarker •
link Write documentation, url='https://flower.ai/docs/framework/contributor-how-to-write-documentation.html'
listitem
ListMarker •
link Release Flower, url='https://flower.ai/docs/framework/contributor-how-to-release-flower.html'
listitem
ListMarker •
link Contribute translations, url='https://flower.ai/docs/framework/contributor-how-to-contribute-translations.html'
listitem
ListMarker •
link How to Build Docker Flower Images Locally, url='https://flower.ai/docs/framework/contributor-how-to-build-docker-images.html'
heading CONTRIBUTOR EXPLANATIONS
list
listitem
ListMarker •
link Public and private APIs, url='https://flower.ai/docs/framework/contributor-explanation-public-and-private-apis.html'
heading CONTRIBUTOR REFERENCES
list
listitem
ListMarker •
link Good first contributions, url='https://flower.ai/docs/framework/contributor-ref-good-first-contributions.html'
listitem
ListMarker •
link Secure Aggregation Protocols, url='https://flower.ai/docs/framework/contributor-ref-secure-aggregation-protocols.html'
contentinfo
link Next What is Federated Learning?, url='https://flower.ai/docs/framework/tutorial-series-what-is-federated-learning.html'
StaticText Next
SvgRoot
group Expand
StaticText Copyright © 2025 Flower Labs GmbH
StaticText Made with
link Sphinx, url='https://www.sphinx-doc.org/'
StaticText and
link @pradyunsg, url='https://pradyunsg.me/'
StaticText 's
link Furo, url='https://github.com/pradyunsg/furo'
complementary
StaticText ON THIS PAGE
list
listitem
list
listitem
[810] link Join the Flower Community, center=(1534,67), url='https://flower.ai/docs/framework/#join-the-flower-community'
listitem
[812] link Flower Framework, center=(1505,91), url='https://flower.ai/docs/framework/#flower-framework'
list
listitem
[815] link Tutorials, center=(1490,115), url='https://flower.ai/docs/framework/#tutorials'
list
listitem
[818] link How-to guides, center=(1510,139), url='https://flower.ai/docs/framework/#how-to-guides'
listitem
[820] link Explanations, center=(1505,163), url='https://flower.ai/docs/framework/#explanations'
listitem
[822] link References, center=(1499,187), url='https://flower.ai/docs/framework/#references'
list
listitem
[825] link Contributor docs, center=(1500,212), url='https://flower.ai/docs/framework/#contributor-docs'
list
RootWebArea Get started with Flower - Flower Framework, focused, url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html'
LabelText
StaticText Hide navigation sidebar
LabelText
StaticText Hide table of contents sidebar
Show more
link Skip to content, url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html#furo-main-content'
complementary
[89] link Logo main, center=(369,156), inner_text=main, url='https://flower.ai/docs/framework/index.html'
image Logo, url='https://flower.ai/docs/framework/_static/flower-logo.png'
search
[94] textbox Search, center=(369,341), contenteditable=True
heading TUTORIAL
list
listitem
[104] link What is Federated Learning?, center=(369,437), url='https://flower.ai/docs/framework/tutorial-series-what-is-federated-learning.html'
listitem
[106] link Get started with Flower, center=(369,472), url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html#'
listitem
[108] link Use a federated learning strategy, center=(369,516), url='https://flower.ai/docs/framework/tutorial-series-use-a-federated-learning-strategy-pytorch.html'
listitem
[110] link Build a strategy from scratch, center=(369,560), url='https://flower.ai/docs/framework/tutorial-series-build-a-strategy-from-scratch-pytorch.html'
listitem
[112] link Customize the client, center=(369,595), url='https://flower.ai/docs/framework/tutorial-series-customize-the-client-pytorch.html'
heading QUICKSTART TUTORIALS
list
listitem
[117] link Quickstart PyTorch, center=(369,680), url='https://flower.ai/docs/framework/tutorial-quickstart-pytorch.html'
listitem
[119] link Quickstart TensorFlow, center=(369,715), url='https://flower.ai/docs/framework/tutorial-quickstart-tensorflow.html'
listitem
[121] link Quickstart MLX, center=(369,750), url='https://flower.ai/docs/framework/tutorial-quickstart-mlx.html'
listitem
[123] link Quickstart 🤗 Transformers, center=(369,785), url='https://flower.ai/docs/framework/tutorial-quickstart-huggingface.html'
listitem
[125] link Quickstart JAX, center=(369,820), url='https://flower.ai/docs/framework/tutorial-quickstart-jax.html'
listitem
[127] link Quickstart Pandas, center=(369,856), url='https://flower.ai/docs/framework/tutorial-quickstart-pandas.html'
listitem
[129] link Quickstart fastai, center=(369,891), url='https://flower.ai/docs/framework/tutorial-quickstart-fastai.html'
listitem
[131] link Quickstart PyTorch Lightning, center=(369,926), url='https://flower.ai/docs/framework/tutorial-quickstart-pytorch-lightning.html'
listitem
[133] link Quickstart scikit-learn, center=(369,961), url='https://flower.ai/docs/framework/tutorial-quickstart-scikitlearn.html'
listitem
link Quickstart XGBoost, url='https://flower.ai/docs/framework/tutorial-quickstart-xgboost.html'
listitem
link Quickstart Android, url='https://flower.ai/docs/framework/tutorial-quickstart-android.html'
listitem
link Quickstart iOS, url='https://flower.ai/docs/framework/tutorial-quickstart-ios.html'
heading HOW-TO GUIDES
list
listitem
link Install Flower, url='https://flower.ai/docs/framework/how-to-install-flower.html'
listitem
link Configure Clients, url='https://flower.ai/docs/framework/how-to-configure-clients.html'
listitem
link Design stateful ClientApps, url='https://flower.ai/docs/framework/how-to-design-stateful-clients.html'
listitem
link Use strategies, url='https://flower.ai/docs/framework/how-to-use-strategies.html'
listitem
link Implement strategies, url='https://flower.ai/docs/framework/how-to-implement-strategies.html'
listitem
link Aggregate evaluation results, url='https://flower.ai/docs/framework/how-to-aggregate-evaluation-results.html'
listitem
link Save and Load Model Checkpoints, url='https://flower.ai/docs/framework/how-to-save-and-load-model-checkpoints.html'
listitem
link Run simulations, url='https://flower.ai/docs/framework/how-to-run-simulations.html'
listitem
link Enable TLS connections, url='https://flower.ai/docs/framework/how-to-enable-tls-connections.html'
listitem
link Use Built-in Mods, url='https://flower.ai/docs/framework/how-to-use-built-in-mods.html'
listitem
link Use Differential Privacy, url='https://flower.ai/docs/framework/how-to-use-differential-privacy.html'
listitem
link Authenticate SuperNodes, url='https://flower.ai/docs/framework/how-to-authenticate-supernodes.html'
listitem
link Implement FedBN, url='https://flower.ai/docs/framework/how-to-implement-fedbn.html'
listitem
link Run Flower on Azure, url='https://flower.ai/docs/framework/how-to-run-flower-on-azure.html'
listitem
link Use CLI JSON output, url='https://flower.ai/docs/framework/how-to-use-cli-json-output.html'
listitem
link Run Flower using Docker, url='https://flower.ai/docs/framework/docker/index.html'
LabelText
StaticText Toggle navigation of Run Flower using Docker
SvgRoot
group Expand
listitem
link Upgrade to Flower 1.0, url='https://flower.ai/docs/framework/how-to-upgrade-to-flower-1.0.html'
listitem
link Upgrade to Flower 1.13, url='https://flower.ai/docs/framework/how-to-upgrade-to-flower-1.13.html'
heading EXPLANATIONS
list
listitem
link Federated evaluation, url='https://flower.ai/docs/framework/explanation-federated-evaluation.html'
listitem
link Differential Privacy, url='https://flower.ai/docs/framework/explanation-differential-privacy.html'
listitem
link Flower Architecture, url='https://flower.ai/docs/framework/explanation-flower-architecture.html'
heading API REFERENCE
list
listitem
link flwr, url='https://flower.ai/docs/framework/ref-api/flwr.html'
LabelText
StaticText Toggle navigation of flwr
SvgRoot
group Expand
list
listitem
link Flower CLI reference, url='https://flower.ai/docs/framework/ref-api-cli.html'
heading REFERENCE DOCS
list
listitem
link Example projects, url='https://flower.ai/docs/framework/ref-example-projects.html'
listitem
link Telemetry, url='https://flower.ai/docs/framework/ref-telemetry.html'
listitem
link Changelog, url='https://flower.ai/docs/framework/ref-changelog.html'
listitem
link FAQ, url='https://flower.ai/docs/framework/ref-faq.html'
heading CONTRIBUTOR TUTORIALS
list
listitem
link Contribute on GitHub, url='https://flower.ai/docs/framework/contributor-tutorial-contribute-on-github.html'
listitem
link Get started as a contributor, url='https://flower.ai/docs/framework/contributor-tutorial-get-started-as-a-contributor.html'
heading CONTRIBUTOR HOW-TO GUIDES
list
listitem
link Install development versions, url='https://flower.ai/docs/framework/contributor-how-to-install-development-versions.html'
listitem
link Set up a virtual env, url='https://flower.ai/docs/framework/contributor-how-to-set-up-a-virtual-env.html'
listitem
link Develop in VSCode Dev Containers, url='https://flower.ai/docs/framework/contributor-how-to-develop-in-vscode-dev-containers.html'
listitem
link Write documentation, url='https://flower.ai/docs/framework/contributor-how-to-write-documentation.html'
listitem
link Release Flower, url='https://flower.ai/docs/framework/contributor-how-to-release-flower.html'
listitem
link Contribute translations, url='https://flower.ai/docs/framework/contributor-how-to-contribute-translations.html'
listitem
link How to Build Docker Flower Images Locally, url='https://flower.ai/docs/framework/contributor-how-to-build-docker-images.html'
heading CONTRIBUTOR EXPLANATIONS
list
listitem
link Public and private APIs, url='https://flower.ai/docs/framework/contributor-explanation-public-and-private-apis.html'
heading CONTRIBUTOR REFERENCES
list
listitem
link Good first contributions, url='https://flower.ai/docs/framework/contributor-ref-good-first-contributions.html'
listitem
link Secure Aggregation Protocols, url='https://flower.ai/docs/framework/contributor-ref-secure-aggregation-protocols.html'
[527] LabelText, center=(369,1004), inner_text=Versions
StaticText Versions
list
listitem
ListMarker •
link v1.8.0, url='javascript:void(0);'
listitem
ListMarker •
link v1.9.0, url='javascript:void(0);'
listitem
ListMarker •
link v1.10.0, url='javascript:void(0);'
listitem
ListMarker •
link v1.11.0, url='javascript:void(0);'
listitem
ListMarker •
link v1.11.1, url='javascript:void(0);'
listitem
ListMarker •
link v1.12.0, url='javascript:void(0);'
listitem
ListMarker •
link v1.13.0, url='javascript:void(0);'
listitem
ListMarker •
link v1.13.1, url='javascript:void(0);'
listitem
ListMarker •
link v1.14.0, url='javascript:void(0);'
listitem
ListMarker •
link main, url='javascript:void(0);'
[553] link 🇬🇧, center=(276,1047), url='https://flower.ai/docs/framework/main/en/tutorial-series-get-started-with-flower-pytorch.html'
[554] link 🇫🇷, center=(350,1047), url='https://flower.ai/docs/framework/main/fr/tutorial-series-get-started-with-flower-pytorch.html'
[555] link 🇨🇳, center=(424,1047), url='https://flower.ai/docs/framework/main/zh_Hans/tutorial-series-get-started-with-flower-pytorch.html'
[556] link 🇰🇷, center=(480,1047), url='https://flower.ai/docs/framework/main/ko/tutorial-series-get-started-with-flower-pytorch.html'
[565] link View this page, center=(1323,42), title=View this page, url='https://flower.ai/docs/framework/_sources/tutorial-series-get-started-with-flower-pytorch.ipynb.txt'
image
[569] button Toggle Light / Dark / Auto color theme, center=(1354,40)
SvgRoot
group Light mode
main
[581] link Open in Colab, center=(614,40), url='https://colab.research.google.com/github/adap/flower/blob/main/framework/docs/source/tutorial-series-get-started-with-flower-pytorch.ipynb'
image Open in Colab, url='https://colab.research.google.com/assets/colab-badge.svg'
heading Get started with Flower
paragraph
StaticText Welcome to the Flower federated learning tutorial!
paragraph
StaticText In this notebook, we’ll build a federated learning system using the Flower framework, Flower Datasets and PyTorch. In part 1, we use PyTorch for the model training pipeline and data loading. In part 2, we federate the PyTorch project using Flower.
blockquote
paragraph
[591] link Star Flower on GitHub, center=(674,324), url='https://github.com/adap/flower'
StaticText ⭐️ and join the Flower community on Flower Discuss and the Flower Slack to connect, ask questions, and get help: -
[592] link Join Flower Discuss, center=(1148,350), url='https://discuss.flower.ai/'
StaticText We’d love to hear from you in the
code
StaticText Introduction
StaticText topic! If anything is unclear, post in
code
StaticText Flower
StaticText Help
StaticText -
StaticText Beginners
StaticText . -
[600] link Join Flower Slack, center=(755,403), url='https://flower.ai/join-slack'
StaticText We’d love to hear from you in the
code
StaticText #introductions
StaticText channel! If anything is unclear, head over to the
code
StaticText #questions
StaticText channel.
paragraph
StaticText Let’s get started! 🌼
heading Step 0: Preparation
paragraph
StaticText Before we begin with any actual code, let’s make sure that we have everything we need.
heading Install dependencies
paragraph
StaticText Next, we install the necessary packages for PyTorch (
code
StaticText torch
StaticText and
code
StaticText torchvision
StaticText ), Flower Datasets (
code
StaticText flwr-datasets
StaticText ) and Flower (
code
StaticText flwr
StaticText ):
StaticText [ ]:
StaticText !pip install -q flwr[simulation] flwr-datasets[vision] torch torchvision matplotlib
[634] button Copy to clipboard, center=(1344,768)
image Copy to clipboard
paragraph
StaticText Now that we have all dependencies installed, we can import everything we need for this tutorial:
StaticText [ ]:
StaticText from collections import OrderedDict
from typing import List, Tuple
import matplotlib.pyplot as plt
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision.transforms as transforms
from datasets.utils.logging import disable_progress_bar
from torch.utils.data import DataLoader
import flwr
from flwr.client import Client, ClientApp, NumPyClient
from flwr.common import Metrics, Context
from flwr.server import ServerApp, ServerConfig, ServerAppComponents
from flwr.server.strategy import FedAvg
from flwr.simulation import run_simulation
from flwr_datasets import FederatedDataset
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
print(f"Training on {DEVICE}")
print(f"Flower {flwr.__version__} / PyTorch {torch.__version__}")
disable_progress_bar()
[650] button Copy to clipboard, center=(1344,886)
image Copy to clipboard
paragraph
StaticText It is possible to switch to a runtime that has GPU acceleration enabled (on Google Colab:
code
StaticText Runtime
StaticText >
StaticText Change
StaticText runtime
StaticText type
StaticText >
StaticText Hardware
StaticText accelerator:
StaticText GPU
StaticText >
StaticText Save
StaticText ). 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
code
StaticText DEVICE
StaticText =
StaticText torch.device("cpu")
StaticText . If the runtime has GPU acceleration enabled, you should see the output
code
StaticText Training
StaticText on
StaticText cuda
StaticText , otherwise it’ll say
code
StaticText Training
StaticText on
StaticText cpu
StaticText .
heading Load the data
paragraph
StaticText Federated learning can be applied to many different types of tasks across different domains. In this tutorial, we introduce federated learning by training a simple convolutional neural network (CNN) on the popular CIFAR-10 dataset. CIFAR-10 can be used to train image classifiers that distinguish between images from ten different classes: ‘airplane’, ‘automobile’, ‘bird’, ‘cat’, ‘deer’, ‘dog’, ‘frog’, ‘horse’, ‘ship’, and ‘truck’.
paragraph
StaticText We simulate having multiple datasets from multiple organizations (also called the “cross-silo” setting in federated learning) by splitting the original CIFAR-10 dataset into multiple partitions. Each partition will represent the data from a single organization. We’re doing this purely for experimentation purposes, in the real world there’s no need for data splitting because each organization already has their own data (the data is naturally partitioned).
paragraph
StaticText Each organization will act as a client in the federated learning system. Having ten organizations participate in a federation means having ten clients connected to the federated learning server.
paragraph
StaticText We use the Flower Datasets library (
code
StaticText flwr-datasets
StaticText ) to partition CIFAR-10 into ten partitions using
code
StaticText FederatedDataset
StaticText . We will create a small training and test set for each of the ten organizations and wrap each of these into a PyTorch
code
StaticText DataLoader
StaticText :
StaticText [ ]:
StaticText NUM_CLIENTS = 10
BATCH_SIZE = 32
def load_datasets(partition_id: int):
fds = FederatedDataset(dataset="cifar10", partitioners={"train": NUM_CLIENTS})
partition = fds.load_partition(partition_id)
# Divide data on each node: 80% train, 20% test
partition_train_test = partition.train_test_split(test_size=0.2, seed=42)
pytorch_transforms = transforms.Compose(
[transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))]
)
def apply_transforms(batch):
# Instead of passing transforms to CIFAR10(..., transform=transform)
# we will use this function to dataset.with_transform(apply_transforms)
# The transforms object is exactly the same
batch["img"] = [pytorch_transforms(img) for img in batch["img"]]
return batch
# Create train/val for each partition and wrap it into DataLoader
partition_train_test = partition_train_test.with_transform(apply_transforms)
trainloader = DataLoader(
partition_train_test["train"], batch_size=BATCH_SIZE, shuffle=True
)
valloader = DataLoader(partition_train_test["test"], batch_size=BATCH_SIZE)
testset = fds.load_split("test").with_transform(apply_transforms)
testloader = DataLoader(testset, batch_size=BATCH_SIZE)
return trainloader, valloader, testloader
button Copy to clipboard
image Copy to clipboard
paragraph
StaticText We now have a function that can return a training set and validation set (
code
StaticText trainloader
StaticText and
code
StaticText valloader
StaticText ) representing one dataset from one of ten different organizations. Each
code
StaticText trainloader
StaticText /
code
StaticText valloader
StaticText pair contains 4000 training examples and 1000 validation examples. There’s also a single
code
StaticText testloader
StaticText (we did not split the test set). Again, this is only necessary for building research or educational systems, actual federated learning systems have their data naturally distributed across multiple partitions.
paragraph
StaticText Let’s take a look at the first batch of images and labels in the first training set (i.e.,
code
StaticText trainloader
StaticText from
code
StaticText partition_id=0
StaticText ) before we move on:
StaticText [ ]:
StaticText trainloader, _, _ = load_datasets(partition_id=0)
batch = next(iter(trainloader))
images, labels = batch["img"], batch["label"]
# Reshape and convert images to a NumPy array
# matplotlib requires images with the shape (height, width, 3)
images = images.permute(0, 2, 3, 1).numpy()
# Denormalize
images = images / 2 + 0.5
# Create a figure and a grid of subplots
fig, axs = plt.subplots(4, 8, figsize=(12, 6))
# Loop over the images and plot them
for i, ax in enumerate(axs.flat):
ax.imshow(images[i])
ax.set_title(trainloader.dataset.features["label"].int2str([labels[i]])[0])
ax.axis("off")
# Show the plot
fig.tight_layout()
plt.show()
button Copy to clipboard
image Copy to clipboard
paragraph
StaticText The output above shows a random batch of images from the
code
StaticText trainloader
StaticText from the first of ten partitions. It also prints the labels associated with each image (i.e., one of the ten possible labels we’ve seen above). If you run the cell again, you should see another batch of images.
heading Step 1: Centralized Training with PyTorch
paragraph
StaticText Next, we’re going to use PyTorch to define a simple convolutional neural network. This introduction assumes basic familiarity with PyTorch, so it doesn’t cover the PyTorch-related aspects in full detail. If you want to dive deeper into PyTorch, we recommend
link DEEP LEARNING WITH PYTORCH: A 60 MINUTE BLITZ, url='https://pytorch.org/tutorials/beginner/deep_learning_60min_blitz.html'
StaticText .
heading Define the model
paragraph
StaticText We use the simple CNN described in the
link PyTorch tutorial, url='https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html#define-a-convolutional-neural-network'
StaticText :
StaticText [ ]:
StaticText class Net(nn.Module):
def __init__(self) -> None:
super(Net, self).__init__()
self.conv1 = nn.Conv2d(3, 6, 5)
self.pool = nn.MaxPool2d(2, 2)
self.conv2 = nn.Conv2d(6, 16, 5)
self.fc1 = nn.Linear(16 * 5 * 5, 120)
self.fc2 = nn.Linear(120, 84)
self.fc3 = nn.Linear(84, 10)
def forward(self, x: torch.Tensor) -> torch.Tensor:
x = self.pool(F.relu(self.conv1(x)))
x = self.pool(F.relu(self.conv2(x)))
x = x.view(-1, 16 * 5 * 5)
x = F.relu(self.fc1(x))
x = F.relu(self.fc2(x))
x = self.fc3(x)
return x
button Copy to clipboard
image Copy to clipboard
paragraph
StaticText Let’s continue with the usual training and test functions:
StaticText [ ]:
StaticText def train(net, trainloader, epochs: int, verbose=False):
"""Train the network on the training set."""
criterion = torch.nn.CrossEntropyLoss()
optimizer = torch.optim.Adam(net.parameters())
net.train()
for epoch in range(epochs):
correct, total, epoch_loss = 0, 0, 0.0
for batch in trainloader:
images, labels = batch["img"].to(DEVICE), batch["label"].to(DEVICE)
optimizer.zero_grad()
outputs = net(images)
loss = criterion(outputs, labels)
loss.backward()
optimizer.step()
# Metrics
epoch_loss += loss
total += labels.size(0)
correct += (torch.max(outputs.data, 1)[1] == labels).sum().item()
epoch_loss /= len(trainloader.dataset)
epoch_acc = correct / total
if verbose:
print(f"Epoch {epoch+1}: train loss {epoch_loss}, accuracy {epoch_acc}")
def test(net, testloader):
"""Evaluate the network on the entire test set."""
criterion = torch.nn.CrossEntropyLoss()
correct, total, loss = 0, 0, 0.0
net.eval()
with torch.no_grad():
for batch in testloader:
images, labels = batch["img"].to(DEVICE), batch["label"].to(DEVICE)
outputs = net(images)
loss += criterion(outputs, labels).item()
_, predicted = torch.max(outputs.data, 1)
total += labels.size(0)
correct += (predicted == labels).sum().item()
loss /= len(testloader.dataset)
accuracy = correct / total
return loss, accuracy
button Copy to clipboard
image Copy to clipboard
heading Train the model
paragraph
StaticText We now have all the basic building blocks we need: a dataset, a model, a training function, and a test function. Let’s put them together to train the model on the dataset of one of our organizations (
code
StaticText partition_id=0
StaticText ). This simulates the reality of most machine learning projects today: each organization has their own data and trains models only on this internal data:
StaticText [ ]:
StaticText trainloader, valloader, testloader = load_datasets(partition_id=0)
net = Net().to(DEVICE)
for epoch in range(5):
train(net, trainloader, 1)
loss, accuracy = test(net, valloader)
print(f"Epoch {epoch+1}: validation loss {loss}, accuracy {accuracy}")
loss, accuracy = test(net, testloader)
print(f"Final test set performance:\n\tloss {loss}\n\taccuracy {accuracy}")
button Copy to clipboard
image Copy to clipboard
paragraph
StaticText Training the simple CNN on our CIFAR-10 split for 5 epochs should result in a test set accuracy of about 41%, which is not good, but at the same time, it doesn’t really matter for the purposes of this tutorial. The intent was just to show a simple centralized training pipeline that sets the stage for what comes next - federated learning!
heading Step 2: Federated Learning with Flower
paragraph
StaticText Step 1 demonstrated a simple centralized training pipeline. All data was in one place (i.e., a single
code
StaticText trainloader
StaticText and a single
code
StaticText valloader
StaticText ). Next, we’ll simulate a situation where we have multiple datasets in multiple organizations and where we train a model over these organizations using federated learning.
heading Update model parameters
paragraph
StaticText In federated learning, the server sends global model parameters to the client, and the client updates the local model with parameters received from the server. It then trains the model on the local data (which changes the model parameters locally) and sends the updated/changed model parameters back to the server (or, alternatively, it sends just the gradients back to the server, not the full model parameters).
paragraph
StaticText We need two helper functions to update the local model with parameters received from the server and to get the updated model parameters from the local model:
code
StaticText set_parameters
StaticText and
code
StaticText get_parameters
StaticText . The following two functions do just that for the PyTorch model above.
paragraph
StaticText The details of how this works are not really important here (feel free to consult the PyTorch documentation if you want to learn more). In essence, we use
code
StaticText state_dict
StaticText to access PyTorch model parameter tensors. The parameter tensors are then converted to/from a list of NumPy ndarray’s (which the Flower
code
StaticText NumPyClient
StaticText knows how to serialize/deserialize):
StaticText [ ]:
StaticText def set_parameters(net, parameters: List[np.ndarray]):
params_dict = zip(net.state_dict().keys(), parameters)
state_dict = OrderedDict({k: torch.Tensor(v) for k, v in params_dict})
net.load_state_dict(state_dict, strict=True)
def get_parameters(net) -> List[np.ndarray]:
return [val.cpu().numpy() for _, val in net.state_dict().items()]
button Copy to clipboard
image Copy to clipboard
heading Define the Flower ClientApp
paragraph
StaticText With that out of the way, let’s move on to the interesting part. Federated learning systems consist of a server and multiple clients. In Flower, we create a
code
StaticText ServerApp
StaticText and a
code
StaticText ClientApp
StaticText to run the server-side and client-side code, respectively.
paragraph
StaticText The first step toward creating a
code
StaticText ClientApp
StaticText is to implement a subclasses of
code
StaticText flwr.client.Client
StaticText or
code
StaticText flwr.client.NumPyClient
StaticText . We use
code
StaticText NumPyClient
StaticText in this tutorial because it is easier to implement and requires us to write less boilerplate. To implement
code
StaticText NumPyClient
StaticText , we create a subclass that implements the three methods
code
StaticText get_parameters
StaticText ,
code
StaticText fit
StaticText , and
code
StaticText evaluate
StaticText :
list
listitem
ListMarker •
paragraph
code
StaticText get_parameters
StaticText : Return the current local model parameters
listitem
ListMarker •
paragraph
code
StaticText fit
StaticText : Receive model parameters from the server, train the model on the local data, and return the updated model parameters to the server
listitem
ListMarker •
paragraph
code
StaticText evaluate
StaticText : Receive model parameters from the server, evaluate the model on the local data, and return the evaluation result to the server
paragraph
StaticText We mentioned that our clients will use the previously defined PyTorch components for model training and evaluation. Let’s see a simple Flower client implementation that brings everything together:
StaticText [ ]:
StaticText class FlowerClient(NumPyClient):
def __init__(self, net, trainloader, valloader):
self.net = net
self.trainloader = trainloader
self.valloader = valloader
def get_parameters(self, config):
return get_parameters(self.net)
def fit(self, parameters, config):
set_parameters(self.net, parameters)
train(self.net, self.trainloader, epochs=1)
return get_parameters(self.net), len(self.trainloader), {}
def evaluate(self, parameters, config):
set_parameters(self.net, parameters)
loss, accuracy = test(self.net, self.valloader)
return float(loss), len(self.valloader), {"accuracy": float(accuracy)}
button Copy to clipboard
image Copy to clipboard
paragraph
StaticText Our class
code
StaticText FlowerClient
StaticText defines how local training/evaluation will be performed and allows Flower to call the local training/evaluation through
code
StaticText fit
StaticText and
code
StaticText evaluate
StaticText . Each instance of
code
StaticText FlowerClient
StaticText represents a
emphasis
StaticText single client
StaticText in our federated learning system. Federated learning systems have multiple clients (otherwise, there’s not much to federate), so each client will be represented by its own instance of
code
StaticText FlowerClient
StaticText . If we have, for example, three clients in our workload, then we’d have three instances of
code
StaticText FlowerClient
StaticText (one on each of the machines we’d start the client on). Flower calls
code
StaticText FlowerClient.fit
StaticText on the respective instance when the server selects a particular client for training (and
code
StaticText FlowerClient.evaluate
StaticText for evaluation).
paragraph
StaticText In this notebook, we want to simulate a federated learning system with 10 clients
emphasis
StaticText on a single machine
StaticText . This means that the server and all 10 clients will live on a single machine and share resources such as CPU, GPU, and memory. Having 10 clients would mean having 10 instances of
code
StaticText FlowerClient
StaticText in memory. Doing this on a single machine can quickly exhaust the available memory resources, even if only a subset of these clients participates in a single round of federated learning.
paragraph
StaticText In addition to the regular capabilities where server and clients run on multiple machines, Flower, therefore, provides special simulation capabilities that create
code
StaticText FlowerClient
StaticText instances only when they are actually necessary for training or evaluation. To enable the Flower framework to create clients when necessary, we need to implement a function that creates a
code
StaticText FlowerClient
StaticText instance on demand. We typically call this function
code
StaticText client_fn
StaticText . Flower calls
code
StaticText client_fn
StaticText whenever it needs an instance of one particular client to call
code
StaticText fit
StaticText or
code
StaticText evaluate
StaticText (those instances are usually discarded after use, so they should not keep any local state). In federated learning experiments using Flower, clients are identified by a partition ID, or
code
StaticText partition-id
StaticText . This
code
StaticText partition-id
StaticText is used to load different local data partitions for different clients, as can be seen below. The value of
code
StaticText partition-id
StaticText is retrieved from the
code
StaticText node_config
StaticText dictionary in the
code
StaticText Context
StaticText object, which holds the information that persists throughout each training round.
paragraph
StaticText With this, we have the class
code
StaticText FlowerClient
StaticText which defines client-side training/evaluation and
code
StaticText client_fn
StaticText which allows Flower to create
code
StaticText FlowerClient
StaticText instances whenever it needs to call
code
StaticText fit
StaticText or
code
StaticText evaluate
StaticText on one particular client. Last, but definitely not least, we create an instance of
code
StaticText ClientApp
StaticText and pass it the
code
StaticText client_fn
StaticText .
code
StaticText ClientApp
StaticText is the entrypoint that a running Flower client uses to call your code (as defined in, for example,
code
StaticText FlowerClient.fit
StaticText ).
StaticText [ ]:
StaticText def client_fn(context: Context) -> Client:
"""Create a Flower client representing a single organization."""
# Load model
net = Net().to(DEVICE)
# Load data (CIFAR-10)
# Note: each client gets a different trainloader/valloader, so each client
# will train and evaluate on their own unique data partition
# Read the node_config to fetch data partition associated to this node
partition_id = context.node_config["partition-id"]
trainloader, valloader, _ = load_datasets(partition_id=partition_id)
# Create a single Flower client representing a single organization
# FlowerClient is a subclass of NumPyClient, so we need to call .to_client()
# to convert it to a subclass of `flwr.client.Client`
return FlowerClient(net, trainloader, valloader).to_client()
# Create the ClientApp
client = ClientApp(client_fn=client_fn)
button Copy to clipboard
image Copy to clipboard
heading Define the Flower ServerApp
paragraph
StaticText On the server side, we need to configure a strategy which encapsulates the federated learning approach/algorithm, for example,
emphasis
StaticText Federated Averaging
StaticText (FedAvg). Flower has a number of built-in strategies, but we can also use our own strategy implementations to customize nearly all aspects of the federated learning approach. For this example, we use the built-in
code
StaticText FedAvg
StaticText implementation and customize it using a few basic parameters:
StaticText [ ]:
StaticText # Create FedAvg strategy
strategy = FedAvg(
fraction_fit=1.0, # Sample 100% of available clients for training
fraction_evaluate=0.5, # Sample 50% of available clients for evaluation
min_fit_clients=10, # Never sample less than 10 clients for training
min_evaluate_clients=5, # Never sample less than 5 clients for evaluation
min_available_clients=10, # Wait until all 10 clients are available
)
button Copy to clipboard
image Copy to clipboard
paragraph
StaticText Similar to
code
StaticText ClientApp
StaticText , we create a
code
StaticText ServerApp
StaticText using a utility function
code
StaticText server_fn
StaticText . In
code
StaticText server_fn
StaticText , we pass an instance of
code
StaticText ServerConfig
StaticText for defining the number of federated learning rounds (
code
StaticText num_rounds
StaticText ) and we also pass the previously created
code
StaticText strategy
StaticText . The
code
StaticText server_fn
StaticText returns a
code
StaticText ServerAppComponents
StaticText object containing the settings that define the
code
StaticText ServerApp
StaticText behaviour.
code
StaticText ServerApp
StaticText is the entrypoint that Flower uses to call all your server-side code (for example, the strategy).
StaticText [ ]:
StaticText def server_fn(context: Context) -> ServerAppComponents:
"""Construct components that set the ServerApp behaviour.
You can use the settings in `context.run_config` to parameterize the
construction of all elements (e.g the strategy or the number of rounds)
wrapped in the returned ServerAppComponents object.
"""
# Configure the server for 5 rounds of training
config = ServerConfig(num_rounds=5)
return ServerAppComponents(strategy=strategy, config=config)
# Create the ServerApp
server = ServerApp(server_fn=server_fn)
button Copy to clipboard
image Copy to clipboard
heading Run the training
paragraph
StaticText In simulation, we often want to control the amount of resources each client can use. In the next cell, we specify a
code
StaticText backend_config
StaticText dictionary with the
code
StaticText client_resources
StaticText key (required) for defining the amount of CPU and GPU resources each client can access.
StaticText [ ]:
StaticText # Specify the resources each of your clients need
# By default, each client will be allocated 1x CPU and 0x GPUs
backend_config = {"client_resources": {"num_cpus": 1, "num_gpus": 0.0}}
# When running on GPU, assign an entire GPU for each client
if DEVICE == "cuda":
backend_config = {"client_resources": {"num_cpus": 1, "num_gpus": 1.0}}
# Refer to our Flower framework documentation for more details about Flower simulations
# and how to set up the `backend_config`
button Copy to clipboard
image Copy to clipboard
paragraph
StaticText The last step is the actual call to
code
StaticText run_simulation
StaticText which - you guessed it - runs the simulation.
code
StaticText run_simulation
StaticText accepts a number of arguments: -
code
StaticText server_app
StaticText and
code
StaticText client_app
StaticText : the previously created
code
StaticText ServerApp
StaticText and
code
StaticText ClientApp
StaticText objects, respectively -
code
StaticText num_supernodes
StaticText : the number of
code
StaticText SuperNodes
StaticText to simulate which equals the number of clients for Flower simulation -
code
StaticText backend_config
StaticText : the resource allocation used in this simulation
StaticText [ ]:
StaticText # Run simulation
run_simulation(
server_app=server,
client_app=client,
num_supernodes=NUM_CLIENTS,
backend_config=backend_config,
)
button Copy to clipboard
image Copy to clipboard
heading Behind the scenes
paragraph
StaticText So how does this work? How does Flower execute this simulation?
paragraph
StaticText When we call
code
StaticText run_simulation
StaticText , we tell Flower that there are 10 clients (
code
StaticText num_supernodes=10
StaticText , where 1
code
StaticText SuperNode
StaticText launches 1
code
StaticText ClientApp
StaticText ). Flower then goes ahead an asks the
code
StaticText ServerApp
StaticText to issue an instructions to those nodes using the
code
StaticText FedAvg
StaticText strategy.
code
StaticText FedAvg
StaticText knows that it should select 100% of the available clients (
code
StaticText fraction_fit=1.0
StaticText ), so it goes ahead and selects 10 random clients (i.e., 100% of 10).
paragraph
StaticText Flower then asks the selected 10 clients to train the model. Each of the 10
code
StaticText ClientApp
StaticText instances receives a message, which causes it to call
code
StaticText client_fn
StaticText to create an instance of
code
StaticText FlowerClient
StaticText . It then calls
code
StaticText .fit()
StaticText on each the
code
StaticText FlowerClient
StaticText instances and returns the resulting model parameter updates to the
code
StaticText ServerApp
StaticText . When the
code
StaticText ServerApp
StaticText receives the model parameter updates from the clients, it hands those updates over to the strategy (
emphasis
StaticText FedAvg
StaticText ) for aggregation. The strategy aggregates those updates and returns the new global model, which then gets used in the next round of federated learning.
heading Where’s the accuracy?
paragraph
StaticText You may have noticed that all metrics except for
code
StaticText losses_distributed
StaticText are empty. Where did the
code
StaticText {"accuracy":
StaticText float(accuracy)}
StaticText go?
paragraph
StaticText Flower can automatically aggregate losses returned by individual clients, but it cannot do the same for metrics in the generic metrics dictionary (the one with the
code
StaticText accuracy
StaticText key). Metrics dictionaries can contain very different kinds of metrics and even key/value pairs that are not metrics at all, so the framework does not (and can not) know how to handle these automatically.
paragraph
StaticText As users, we need to tell the framework how to handle/aggregate these custom metrics, and we do so by passing metric aggregation functions to the strategy. The strategy will then call these functions whenever it receives fit or evaluate metrics from clients. The two possible functions are
code
StaticText fit_metrics_aggregation_fn
StaticText and
code
StaticText evaluate_metrics_aggregation_fn
StaticText .
paragraph
StaticText Let’s create a simple weighted averaging function to aggregate the
code
StaticText accuracy
StaticText metric we return from
code
StaticText evaluate
StaticText :
StaticText [ ]:
StaticText def weighted_average(metrics: List[Tuple[int, Metrics]]) -> Metrics:
# Multiply accuracy of each client by number of examples used
accuracies = [num_examples * m["accuracy"] for num_examples, m in metrics]
examples = [num_examples for num_examples, _ in metrics]
# Aggregate and return custom metric (weighted average)
return {"accuracy": sum(accuracies) / sum(examples)}
button Copy to clipboard
image Copy to clipboard
StaticText [ ]:
StaticText def server_fn(context: Context) -> ServerAppComponents:
"""Construct components that set the ServerApp behaviour.
You can use settings in `context.run_config` to parameterize the
construction of all elements (e.g the strategy or the number of rounds)
wrapped in the returned ServerAppComponents object.
"""
# Create FedAvg strategy
strategy = FedAvg(
fraction_fit=1.0,
fraction_evaluate=0.5,
min_fit_clients=10,
min_evaluate_clients=5,
min_available_clients=10,
evaluate_metrics_aggregation_fn=weighted_average, # <-- pass the metric aggregation function
)
# Configure the server for 5 rounds of training
config = ServerConfig(num_rounds=5)
return ServerAppComponents(strategy=strategy, config=config)
# Create a new server instance with the updated FedAvg strategy
server = ServerApp(server_fn=server_fn)
# Run simulation
run_simulation(
server_app=server,
client_app=client,
num_supernodes=NUM_CLIENTS,
backend_config=backend_config,
)
button Copy to clipboard
image Copy to clipboard
paragraph
StaticText We now have a full system that performs federated training and federated evaluation. It uses the
code
StaticText weighted_average
StaticText function to aggregate custom evaluation metrics and calculates a single
code
StaticText accuracy
StaticText metric across all clients on the server side.
paragraph
StaticText The other two categories of metrics (
code
StaticText losses_centralized
StaticText and
code
StaticText metrics_centralized
StaticText ) are still empty because they only apply when centralized evaluation is being used. Part two of the Flower tutorial will cover centralized evaluation.
heading Final remarks
paragraph
StaticText Congratulations, you just trained a convolutional neural network, federated over 10 clients! With that, you understand the basics of federated learning with Flower. The same approach you’ve seen can be used with other machine learning frameworks (not just PyTorch) and tasks (not just CIFAR-10 images classification), for example NLP with Hugging Face Transformers or speech with SpeechBrain.
paragraph
StaticText In the next notebook, we’re going to cover some more advanced concepts. Want to customize your strategy? Initialize parameters on the server side? Or evaluate the aggregated model on the server side? We’ll cover all this and more in the next tutorial.
heading Next steps
paragraph
StaticText Before you continue, make sure to join the Flower community on Flower Discuss (
link Join Flower Discuss, url='https://discuss.flower.ai/'
StaticText ) and on Slack (
link Join Slack, url='https://flower.ai/join-slack/'
StaticText ).
paragraph
StaticText There’s a dedicated
code
StaticText #questions
StaticText channel if you need help, but we’d also love to hear who you are in
code
StaticText #introductions
StaticText !
paragraph
StaticText The
link Flower Federated Learning Tutorial - Part 2, url='https://flower.ai/docs/framework/tutorial-use-a-federated-learning-strategy-pytorch.html'
StaticText goes into more depth about strategies and all the advanced things you can build with them.
link Open in Colab, url='https://colab.research.google.com/github/adap/flower/blob/main/framework/docs/source/tutorial-series-get-started-with-flower-pytorch.ipynb'
image Open in Colab, url='https://colab.research.google.com/assets/colab-badge.svg'
contentinfo
link Next Use a federated learning strategy, url='https://flower.ai/docs/framework/tutorial-series-use-a-federated-learning-strategy-pytorch.html'
StaticText Next
SvgRoot
group Expand
link Previous What is Federated Learning?, url='https://flower.ai/docs/framework/tutorial-series-what-is-federated-learning.html'
SvgRoot
group Expand
StaticText Previous
StaticText Copyright © 2025 Flower Labs GmbH
StaticText Made with
link Sphinx, url='https://www.sphinx-doc.org/'
StaticText and
link @pradyunsg, url='https://pradyunsg.me/'
StaticText 's
link Furo, url='https://github.com/pradyunsg/furo'
complementary
StaticText ON THIS PAGE
list
listitem
list
listitem
[1242] link Step 0: Preparation, center=(1509,67), url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html#Step-0:-Preparation'
list
listitem
[1245] link Install dependencies, center=(1531,91), url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html#Install-dependencies'
listitem
[1247] link Load the data, center=(1508,115), url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html#Load-the-data'
listitem
link Step 1: Centralized Training with PyTorch, url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html#Step-1:-Centralized-Training-with-PyTorch'
list
listitem
[1252] link Define the model, center=(1520,180), url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html#Define-the-model'
listitem
[1254] link Train the model, center=(1514,205), url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html#Train-the-model'
listitem
link Step 2: Federated Learning with Flower, url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html#Step-2:-Federated-Learning-with-Flower'
list
listitem
[1259] link Update model parameters, center=(1549,270), url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html#Update-model-parameters'
listitem
[1261] link Define the Flower ClientApp, center=(1555,294), url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html#Define-the-Flower-ClientApp'
listitem
[1263] link Define the Flower ServerApp, center=(1558,319), url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html#Define-the-Flower-ServerApp'
listitem
[1265] link Run the training, center=(1516,343), url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html#Run-the-training'
listitem
[1267] link Behind the scenes, center=(1523,367), url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html#Behind-the-scenes'
listitem
[1269] link Where’s the accuracy?, center=(1538,391), url="https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html#Where's-the-accuracy?"
listitem
[1271] link Final remarks, center=(1489,415), url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html#Final-remarks'
listitem
[1273] link Next steps, center=(1480,439), url='https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html#Next-steps'
Reasoning for action: By clicking on the 'Get started with Flower' link, I am directly accessing the introductory tutorial for implementing Flower, which aligns perfectly with the user story goals of quickly getting started with the framework. This link leads to the essential content that includes step-by-step guidance, making it easier for the researcher to implement Flower in their projects.
Action: click(104) # Click on the 'Get started with Flower' link to explore the introductory tutorial.
Change Description: The browser's URL changed to 'https://flower.ai/docs/framework/tutorial-series-get-started-with-flower-pytorch.html', and the page content now displays the 'Get started with Flower' tutorial, replacing the previous documentation page for the Flower Framework.
Screenshot before:Screenshot after:---