Repository navigation
docs: add the first two task-oriented tutorials - #58
Merged
Merged
Conversation
- tutorial-first-experiment.rst: compare FedAvg/FedProx/SCAFFOLD at two sampling ratios on synthetic data, then dissect what num_communications counts (messages, not rounds, with the discriminating check and the per-direction decomposition) and how communication-skipping algorithms (FedPD) change the picture; the shown code is embedded via literalinclude from the runnable script test-files/tutorial_first_experiment.py - tutorial-cli-matrix.rst: run an experiment matrix from a single YAML file; the demo config example-configs/fedsynthetic-demo.yml expands into four synthetic-data runs, and the page documents the per-arm tag that keeps same-minute runs from overwriting each other's logs - index.rst: new Tutorials toctree section; quickstart next steps now point at the tutorials - test/test_tutorial_scripts.py: behavioral smoke tests extended to both tutorials — the comparison-table invariants (90/180 communications), the FedPD coda (fewer communications than FedAvg with at least one real uplink), and the CLI matrix expansion (distinct tags, one log pair per arm, budget asserted from config.json) - zh_CN translations for the new and updated pages
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
num_communicationscounts — messages, not rounds, with the discriminating check (3 rounds full sampling = 6 rounds half sampling = 180) and the per-direction decomposition. A closing section runs FedPD next to FedAvg and shows the saved budget comes from skipped uplinks only; it explains the expected RuntimeWarnings on both server and client side and the0 < p < 1constraint. All shown code is embedded vialiteralincludefrom the runnabletest-files/tutorial_first_experiment.py.example-configs/fedsynthetic-demo.ymlexpands into four synthetic-data runs. The page documents the interpolation syntax and the per-armtagthat keeps same-minute runs from overwriting each other's logs (the demo initially hit exactly that — only the last run's json survived until the tags were added).index.rst: new Tutorials toctree section; quickstart next-steps now point at the tutorials.test/test_tutorial_scripts.py: behavioral smoke tests extended — the comparison-table communications invariants (90 / 180), the FedPD coda (fewer communications than FedAvg with at least one real uplink, guarding the degenerate never-uploads case), and the CLI matrix expansion (distinct combinations, interpolated values, one json+txt pair per arm, budget asserted from each run's config.json).Validation
pytest test/test_tutorial_scripts.py test/test_hook_contract.py test/test_messages.py: 19 passed (~19 s for the five behavioral smoke tests, real runs included).