Metadata-Version: 2.1
Name: flwr
Version: 0.1.0
Summary: See `README.md`
Home-page: https://github.com/adap/flower
License: Apache-2.0
Author: Daniel J. Beutel
Author-email: daniel@adap.com
Requires-Python: >=3.6.9,<4.0.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Provides-Extra: benchmark
Provides-Extra: examples-pytorch
Provides-Extra: examples-tensorflow
Provides-Extra: http-logger
Provides-Extra: ops
Requires-Dist: boto3 (>=1.12.36,<2.0.0); extra == "benchmark" or extra == "http-logger" or extra == "http-logger" or extra == "ops"
Requires-Dist: boto3_type_annotations (>=0.3.1,<0.4.0); extra == "benchmark" or extra == "http-logger" or extra == "http-logger" or extra == "ops"
Requires-Dist: dataclasses (==0.6); python_version < "3.7"
Requires-Dist: docker (>=4.2.0,<5.0.0); extra == "benchmark" or extra == "http-logger" or extra == "ops"
Requires-Dist: google (>=2.0.3,<3.0.0)
Requires-Dist: grpcio (>=1.27.2,<2.0.0)
Requires-Dist: matplotlib (>=3.2.1,<4.0.0); extra == "benchmark" or extra == "http-logger"
Requires-Dist: numpy (>=1.18.1,<2.0.0)
Requires-Dist: paramiko (>=2.7.1,<3.0.0); extra == "benchmark" or extra == "http-logger" or extra == "ops"
Requires-Dist: protobuf (==3.12.1)
Requires-Dist: tensorflow-cpu (==2.1.0); extra == "benchmark" or extra == "examples-tensorflow" or extra == "http-logger"
Requires-Dist: torch (==1.5.1); extra == "examples-pytorch"
Requires-Dist: torchvision (==0.6.1); extra == "examples-pytorch"
Project-URL: Documentation, https://github.com/adap/flower
Project-URL: Repository, https://github.com/adap/flower
Description-Content-Type: text/markdown

# Flower - A Friendly Federated Learning Research Framework

[![GitHub license](https://img.shields.io/github/license/adap/flower)](https://github.com/adap/flower/blob/master/LICENSE)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/adap/flower/blob/master/CONTRIBUTING.md)
![Build](https://github.com/adap/flower/workflows/Build/badge.svg)

Flower is a research framework for building federated learning 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 Univerity of
  Oxford, so it was build 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](https://pytorch.org),
  [TensorFlow](https://tensorflow.org), or even raw [NumPy](https://numpy.org/)
  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.

> Note: Even though Flower is used in production, it is published as
> pre-release software. Incompatible API changes are possible.

## Installation

Flower can be installed directly from the GitHub repository using `pip`:

```bash
$ pip install git+https://github.com/adap/flower.git
```

Official [PyPI](https://pypi.org/) releases will follow once the API matures.

## Run Examples

We built a number of examples showcasing different usage scenarios in
`src/flower_example`. To run an example, first install the necessary extras
(available extras: `examples-tensorflow`):

```bash
pip install git+https://github.com/adap/flower.git#egg=flower[examples-tensorflow]
```

Once the necessary extras (e.g., TensorFlow) are installed, you might want to
run the Fashion-MNIST example by starting a single server and multiple clients
in two terminals using the following commands.

Start server in the first terminal:

```bash
$ ./src/flower_example/tf_fashion_mnist/run-server.sh
```

Start the clients in a second terminal:

```bash
$ ./src/flower_example/tf_fashion_mnist/run-clients.sh
```

### Docker

If you have Docker on your machine you might want to skip most of the setup and
try out the example using the following commands:

```bash
# Create docker network `flower` so that containers can reach each other by name
$ docker network create flower
# Build the Flower docker containers
$ ./dev/docker_build.sh

# Run the docker containers (will tail a logfile created by a central logserver)
$ ./src/flower_example/tf_fashion_mnist/run-docker.sh
```

This will start a slightly reduced setup with only four clients.

## Documentation

* [Documentation](https://flower.adap.com/docs/)

## Contributing to Flower

We welcome contributions. Please see [CONTRIBUTING.md](CONTRIBUTING.md) to get
started!

