Repository navigation
docs: add the visualization and parallel-reproducibility tutorials - #59
Merged
Merged
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
wenh06
force-pushed
the
docs-tutorials-c
branch
from
October 28, 2026 00:18
2d96d7d to
2d10b79
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #59 +/- ##
==========================================
+ 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: "Experiments
grow; wall-clock time should not" becomes a plain declarative opening,
question/imperative headings become noun phrases ("One line of
parallelism" -> "Enabling parallel execution", "Explore
interactively" -> "Interactive exploration", "Get some logs" ->
"Preparing the logs"), and metaphorical wording is replaced ("what
the global RNG mode buys (and costs)" -> "Behavior of the global RNG
mode", "treat that as luck, not a guarantee" -> "incidental rather
than guaranteed", "the rule of thumb" -> "Practical guidance").
The zh_CN translations are reworded to match. Script comments and
docstrings shown on the pages are adjusted in the same pass. No
technical content changes.
This was referenced Oct 29, 2026
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
find_log_files→aggregate_results_from_json_log_with_custom_axis→plot_mean_curve_with_error_bounds), export to PDF, and introduce the interactivePaneldashboard for notebook use. The x-axis guidance follows the cumulative-communications metric dissected in the first-experiment tutorial.rng_mode="per_client"the sequential and threads backends produce bitwise identical final weights (torch.equal), while the global mode keeps participation and aggregation backend-independent but may interleave local trajectories. The script prints the contrast honestly (global-mode weights matched on the development machine; the page marks that as luck, not a guarantee).test-files/tutorial_first_experiment.py: every run now takes a fresh model from thecandidate_modelsproperty. The server trains the model it is given in place (self.model = model, no copy), so sharing one module across runs would warm-start every run after the first and contaminate the comparison. The documented table is unchanged (all algorithms saturate at this task's accuracy ceiling), and the run() docstring teaching the rule is shown on the page via literalinclude.test/test_tutorial_scripts.py: two new behavioral smoke tests — curve merge with non-empty curves and PDF export inside a temporary working directory; bitwise sequential-vs-threads equality with per-client RNG plus global-mode communication equality.Validation
pytest test/test_tutorial_scripts.py: 7 passed (~22 s, real runs included).