Repository navigation
Conversation
- tutorial-visualization.rst: merge a two-seed experiment into one mean curve with error bounds and export it to PDF; the interactive Panel dashboard is introduced for notebook use; the shown code is embedded via literalinclude from test-files/tutorial_visualization.py - tutorial-parallel-reproducible.rst: one-line switch to the threads executor, then verify bitwise-identical final weights across backends with rng_mode per_client, and contrast the statistical-level global mode; embedded from test-files/tutorial_parallel_check.py - tutorial_first_experiment.py: every run now takes a fresh model from the candidate-models property; the server trains the model it is given in place, so sharing one module across runs would warm-start every run after the first - test/test_tutorial_scripts.py: two new behavioral smoke tests (curve merge and PDF export in a temporary working directory; bitwise sequential-vs-threads equality with per-client RNG) - zh_CN translations for the new and updated pages
- howto-custom-algorithm: walk through the complete custom algorithm in test-files/custom_alg.py — config classes with validators, the server downlink/aggregation hooks, the client typed uplink contract and its parallel-safety rationale, named parameter exchange, registration, and the two layers (golden regression, hook contract) that protect registered algorithms; the legacy hook style is documented as sequential-only - howto-custom-dataset: the full FedVisionDataset-based example plus a minimal NumPy-to-federated template, verified by execution; the template documents three easy-to-miss conventions (FedDataset has no constructor of its own, get_dataloader must handle client_idx=None, candidate models should be fl-sim models) - howto-custom-optimizer: the optimizer registry, ProxSGD subclassing, name-based selection and its caveats - test-files/custom_*.py: add literalinclude fragment markers (comments only; test_custom.py still passes) - index.rst: new How-to guides toctree section; the CLI tutorial's next steps now link the how-tos instead of promising them - 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@@ Coverage Diff @@
## master #60 +/- ##
==========================================
+ Coverage 83.63% 83.79% +0.15%
==========================================
Files 55 55
Lines 5640 5640
==========================================
+ Hits 4717 4726 +9
+ Misses 923 914 -9 🚀 New features to boost your workflow:
|
Align the phrasing with the rest of the documentation: "research lives
in the variations" becomes a plain declarative opening, question
headings become noun phrases ("When do you need this?" -> "When is a
custom algorithm needed?"), and metaphorical wording is replaced ("How
your algorithm is kept honest" -> "Safeguards for registered
algorithms", "two things bundled together" -> "combines two
components", "look intimidating" -> "appear required", "the
lightest of the three how-tos" -> "the shortest of the three
guides"). The zh_CN translations are reworded to match. No technical
content changes.
Owner
Author
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
test-files/custom_alg.py— config classes with validators, the server downlink/aggregation hooks, the client typed uplink contract with its parallel-safety rationale, named parameter exchange, registration, and the two layers (golden regression + hook contract) that protect registered algorithms. The legacycommunicate(self, target)style is documented as sequential-only.FedVisionDataset-based example, plus a minimal "NumPy arrays to federated dataset" template that was verified by execution while writing it. The template documents three easy-to-miss conventions discovered on the way: the abstractFedDatasetbase has no constructor of its own (a custom__init__accepting(datadir, transform, seed)is required);get_dataloadermust handleclient_idx=None(the framework requests global loaders);candidate_modelsshould return fl-sim models (they carry the.deviceattribute device allocation relies on).ProxSGDsubclassing, name-based selection with the trailing-suffix rule, and the caveats (per-client construction, algorithm-fixed optimizers, server-side optimizers being a separate mechanism).test-files/custom_*.py: literalinclude fragment markers added (comments only;test/test_custom.pypasses unchanged).index.rst: new How-to guides toctree section; the CLI tutorial's next-steps now link the how-tos instead of promising them.Validation
pytest test/test_tutorial_scripts.py test/test_custom.py: 8 passed (includes the CI harness that runs the three custom example files viacustom_conf.yml).FedDataArgs, trained 2 FedAvg iterations) before being embedded.