Flower Datasets#

Flower Datasets (flwr-datasets) is a library to quickly and easily create datasets for federated learning/analytics/evaluation. It is created by the Flower Labs team that also created Flower - a Friendly Federated Learning Framework.

Flower Datasets Framework#


A learning-oriented series of tutorials is the best place to start.


How-to guides#

Problem-oriented how-to guides show step-by-step how to achieve a specific goal.


Information-oriented API reference and other reference material.


Flower Datasets main package.

Main features#

Flower Datasets library supports:

  • downloading datasets - choose the dataset from Hugging Face’s dataset

  • partitioning datasets - customize the partitioning scheme

  • creating centralized datasets - leave parts of the dataset unpartitioned (e.g. for centralized evaluation)

Thanks to using Hugging Face’s datasets used under the hood, Flower Datasets integrates with the following popular formats/frameworks:

  • Hugging Face

  • PyTorch

  • TensorFlow

  • Numpy

  • Pandas

  • Jax

  • Arrow


The simplest install is

python -m pip install flwr-datasets

If you plan to use the image datasets

python -m pip install flwr-datasets[vision]

If you plan to use the audio datasets

python -m pip install flwr-datasets[audio]

Check out the full details on the download in Installation.

How To Use the library#

Learn how to use the flwr-datasets library from the Quickstart examples .

Join the Flower Community#

The Flower Community is growing quickly - we’re a friendly group of researchers, engineers, students, professionals, academics, and other enthusiasts.

Join us on Slack