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

feat(framework) Use dataset caching in flwr new templates #3877

Merged
merged 7 commits into from
Jul 23, 2024

Conversation

jafermarq
Copy link
Contributor

@jafermarq jafermarq commented Jul 23, 2024

Caching the FederatedDataset object creation and its partitioner makes simulations more efficient.

Additional changes:

  • use full names of the dataset e.g. instead of mnist use ylecun/mnist (related to recent names change on HF Hub; both work, though mnist can't be found right now, it's available under the ylecun/mnist name)
  • trust_remote_code=True in FederatedDataset for mnist dataset to avoid the warning of the dataset that does NOT have file representation on HF Hub (note the remaining dataset in the templates have file representation on HF Hub)
  • explicit import of IidPartitioner to simplify user to switch to other partitioning schemes (instead of using the partitioners={split-name: num_partitions} shorter API now it's partitioners={split-name: IidPartitioner(num_partitions)}

@jafermarq jafermarq marked this pull request as ready for review July 23, 2024 10:39
adam-narozniak
adam-narozniak previously approved these changes Jul 23, 2024
@danieljanes danieljanes changed the title fix(framework:skip) Use dataset caching in flwr new templates feat(framework) Use dataset caching in flwr new templates Jul 23, 2024
@danieljanes danieljanes enabled auto-merge (squash) July 23, 2024 12:34
@danieljanes danieljanes merged commit 54b2682 into main Jul 23, 2024
35 checks passed
@danieljanes danieljanes deleted the use-dataset-caching-in-templates branch July 23, 2024 12:41
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