-
Notifications
You must be signed in to change notification settings - Fork 921
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
Add Size Partitioners to FDS #2533
Conversation
Hi Adam, in function |
@yan-gao-GY It regards integers, so it shouldn't make a difference, but I'll change it for clarity. |
@yan-gao-GY I'll remove the "jxie/higgs" you added to the tested list of datasets for two reasons:
|
Hi @adam-narozniak, following our discussion, i just provide a brief summary here for reference:
|
@yan-gao-GY, thanks for the feedback.
|
Co-authored-by: Daniel J. Beutel <[email protected]>
Issue
In Flower Datasets, there are no out-of-the-box solutions for the creation of the partitions that only depend on the size, while this is a setup used in some experiments.
Proposal
Provide a generic class,
SizePartitioner
and a few common subclasses:LinearPartitioner
SquarePartitioner
ExponentialPartitioner
Explanation
This split is deterministic in the sense that the size of each partition size is determined in a deterministic way. Then, the indices are assigned based continuously.
Additionally, the base abstraction checks if the partitions' sizes are >= 1 so that training is possible.
Example usage
They, of course, should be passed to the FederatedDataset abstraction as partitioners for the specific split. The above functionality shows how they work internally.
Discussion
I'm a proponent of the dataset shuffling that later on enables "flatten_indices" which brings back more efficient performance. However, it's not clear to me whose responsibility it should be to shuffle (which FDS abstraction).