MCPcopy Index your code
hub / github.com/flwrlabs/flower

github.com/flwrlabs/flower @framework-1.32.1 sqlite

repository ↗ · DeepWiki ↗ · release framework-1.32.1 ↗
8,462 symbols 42,234 edges 1,423 files 6,574 documented · 78%
README

Flower: A Friendly Federated AI Framework

Flower Website

<a href="https://flower.ai/">Website</a> |
<a href="https://flower.ai/blog">Blog</a> |
<a href="https://flower.ai/docs/">Docs</a> |
<a href="https://flower.ai/join-slack">Slack</a>

GitHub license PRs Welcome Build Downloads Docker Hub Slack

Flower (flwr) is a framework for building federated AI systems. The design of Flower is based on a few guiding principles:

  • Customizable: Federated learning systems vary wildly from one use case to another. Flower allows for a wide range of different configurations depending on the needs of each individual use case.

  • Extendable: Flower originated from a research project at the University of Oxford, so it was built with AI research in mind. Many components can be extended and overridden to build new state-of-the-art systems.

  • Framework-agnostic: Different machine learning frameworks have different strengths. Flower can be used with any machine learning framework, for example, PyTorch, TensorFlow, Hugging Face Transformers, PyTorch Lightning, scikit-learn, JAX, TFLite, MONAI, fastai, MLX, XGBoost, CatBoost, LeRobot for federated robots, Pandas for federated analytics, or even raw NumPy for users who enjoy computing gradients by hand.

  • Understandable: Flower is written with maintainability in mind. The community is encouraged to both read and contribute to the codebase.

Meet the Flower community on flower.ai!

Federated Learning Tutorial

Flower's goal is to make federated learning accessible to everyone. This series of tutorials introduces the fundamentals of federated learning and how to implement them in Flower.

  1. What is Federated Learning?

  2. Get started with Flower

  3. Write your first Flower App

  4. Write your first Flower App with PyTorch

  5. Use a federated learning strategy

  6. Customize a Flower Strategy

  7. Communicate Custom Messages

Stay tuned, more tutorials are coming soon. Topics include Privacy and Security in Federated Learning, and Scaling Federated Learning.

Documentation

Flower Docs:

Flower Baselines

Flower Baselines is a collection of community-contributed projects that reproduce the experiments performed in popular federated learning publications. Researchers can build on Flower Baselines to quickly evaluate new ideas. The Flower community loves contributions! Make your work more visible and enable others to build on it by contributing it as a baseline!

Please refer to the Flower Baselines Documentation for a detailed categorization of baselines and for additional info including: * How to use Flower Baselines * How to contribute a new Flower Baseline

Flower Usage Examples

Several code examples show different usage scenarios of Flower (in combination with popular machine learning frameworks such as PyTorch or TensorFlow).

Quickstart examples:

Other examples:

Community

Flower is built by a wonderful community of researchers and engineers. Join Slack to meet them, contributions are welcome.

Citation

If you publish work that uses Flower, please cite Flower as follows:

@article{beutel2020flower,
  title={Flower: A Friendly Federated Learning Research Framework},
  author={Beutel, Daniel J and Topal, Taner and Mathur, Akhil and Qiu, Xinchi and Fernandez-Marques, Javier and Gao, Yan and Sani, Lorenzo and Kwing, Hei Li and Parcollet, Titouan and Gusmão, Pedro PB de and Lane, Nicholas D},
  journal={arXiv preprint arXiv:2007.14390},
  year={2020}
}

Please also consider adding your publication to the list of Flower-based publications in the docs, just open a Pull Request.

Contributing to Flower

We welcome contributions. Please see CONTRIBUTING.md to get started!

Extension points exported contracts — how you extend this code

ModelLoader (Interface)
Interface for model loaders: objects that handle loading different parts of the model. [2 implementers]
examples/android/client/transfer_api/src/main/java/org/tensorflow/lite/examples/transfer/api/ModelLoader.java
Engine (Interface)
(no doc) [1 implementers]
intelligence/ts/src/engines/engine.ts
LossConsumer (Interface)
Consumer interface for training loss.
examples/android/client/transfer_api/src/main/java/org/tensorflow/lite/examples/transfer/api/TransferLearningModel.java
Message (Interface)
(no doc)
intelligence/ts/src/typing.ts
Usage (Interface)
(no doc)
intelligence/ts/src/typing.ts
ToolParameterProperty (Interface)
(no doc)
intelligence/ts/src/typing.ts
ToolFunctionParameters (Interface)
(no doc)
intelligence/ts/src/typing.ts

Core symbols most depended-on inside this repo

join
called by 413
examples/android/client/app/src/main/java/flwr/android_client/FlowerWorker.java
get
called by 413
examples/android/client/transfer_api/src/androidTest/java/org/tensorflow/lite/examples/transfer/api/LiteTrainHeadModelTest.java
log
called by 375
framework/py/flwr/supercore/telemetry.py
items
called by 294
framework/py/flwr/app/message/typeddict.py
log
called by 251
framework/py/flwr/cli/log.py
keys
called by 241
framework/py/flwr/app/message/typeddict.py
log
called by 226
datasets/flwr_datasets/common/telemetry.py
values
called by 153
framework/py/flwr/app/message/typeddict.py

Shape

Method 3,936
Function 3,478
Class 954
Route 52
Interface 41
Enum 1

Languages

Python95%
TypeScript3%
Java2%

Modules by API surface

framework/py/flwr/server/superlink/linkstate/linkstate_test.py120 symbols
framework/py/flwr/superlink/servicer/control/control_servicer_test.py75 symbols
framework/py/flwr/proto/control_pb2_grpc.py57 symbols
framework/py/flwr/supercore/superexec/executor/kubernetes_executor.py53 symbols
framework/py/flwr/common/serde.py52 symbols
framework/py/flwr/supercore/superexec/executor/kubernetes_executor_test.py49 symbols
framework/py/flwr/supercore/state/alembic/utils_test.py45 symbols
framework/py/flwr/supercore/corestate/corestate_test.py43 symbols
framework/py/flwr/supercore/interceptors/runtime_version_interceptor_test.py42 symbols
framework/py/flwr/superlink/servicer/control/control_servicer.py39 symbols
framework/py/flwr/proto/serverappio_pb2_grpc.py39 symbols
framework/py/flwr/proto/clientappio_pb2_grpc.py39 symbols

Dependencies from manifests, versioned

@eslint/eslintrc3.3.3 · 1×
@eslint/js10.0.1 · 1×
@flwr/flwr0.1.5 · 1×
@mlc-ai/web-llm0.2.84 · 1×
@tailwindcss/typography0.5.19 · 1×
@types/mozilla-readability0.2.1 · 1×
@types/node22.7.9 · 1×
@types/react19.2.10 · 1×
@types/react-dom19.2.3 · 1×

Datastores touched

(mysql)Database · 1 repos
flwrDatabase · 1 repos

For agents

$ claude mcp add flower \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact