Skip to content

Commit

Permalink
Update partitioner example in README
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-narozniak committed Jul 23, 2024
1 parent 081da74 commit 949e678
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions datasets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ Flower Datasets (`flwr-datasets`) is a library to quickly and easily create data


> [!TIP]
> For complete documentation that includes API docs, how-to guides and tutorials please visit the [Flower Datasets Documentation](https://flower.ai/docs/datasets/) and for full FL example see the [Flower Examples page](https://github.com/adap/flower/tree/main/examples).
> For complete documentation that includes API docs, how-to guides and tutorials, please visit the [Flower Datasets Documentation](https://flower.ai/docs/datasets/) and for full FL example see the [Flower Examples page](https://github.com/adap/flower/tree/main/examples).
## Installation

For a complete installation guide visit the [Flower Datasets Documenation](https://flower.ai/docs/datasets/)
For a complete installation guide visit the [Flower Datasets Documentation](https://flower.ai/docs/datasets/)

```bash
pip install flwr-datasets[vision]
Expand Down Expand Up @@ -66,9 +66,11 @@ Here's a basic quickstart example of how to partition the MNIST dataset:

```
from flwr_datasets import FederatedDataset
from flwr_datasets.partitioners import IidPartitioner
# The train split of the MNIST dataset will be partitioned into 100 partitions
fds = FederatedDataset("mnist", partitioners={"train": 100})
partitioner = IidPartitioner(num_partitions=100)
fds = FederatedDataset("mnist", partitioners={"train": partitioner})
partition = fds.load_partition(0)
Expand Down

0 comments on commit 949e678

Please sign in to comment.