Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(datasets) Add how to use partitioner docs #3871

Merged
merged 6 commits into from
Jul 24, 2024

Conversation

adam-narozniak
Copy link
Contributor

Issue

During the Flower Dataset user study, there was a problem with users not having easy material that explained how to use different partitioning schemes with FederatedDataset.

Description

One issue that was present is using FederatedDataset in the docs that use just the shortcut API partitioners={"train": 10} which stands for partitioners={"train": IidPartitioner(10)} (which is addressed). The second problem is the lack of a tutorial to explain that.

Proposal

Add a basic Jupyter Notebook tutorial that explains how to use FederatedDataset with different Partitioners.

Explanation

Emphasize that it's basically very easy because it has the same API.

@jafermarq jafermarq enabled auto-merge (squash) July 24, 2024 08:29
@jafermarq jafermarq merged commit 12e57cf into main Jul 24, 2024
38 checks passed
@jafermarq jafermarq deleted the add-how-to-use-partitioner-docs branch July 24, 2024 08:32
@CarlosReis1505
Copy link

Good morning

I can't understand how to use ChosenPartitioner
I'm trying to use a local dataset using the example :

from datasets import load_dataset
from flwr_datasets.partitioner import ChosenPartitioner

Directly from a directory

dataset = load_dataset(‘imagefolder’, data_dir=‘/path/to/folder’)
partitioner = ChosenPartitioner(...)
partitioner.dataset = dataset
partition = partitioner.load_partition(partition_id=0)

But it returns an error on the ChosenPartitioner line

ImportError: cannot import name ‘PathologicalPartitioner’ from ‘flwr_datasets.partitioner’

Translated with DeepL.com (free version)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants