Skip to content

Docs after #366 and #391: eleven tutorials, eight concepts taught twice, a README maths/code mismatch, and Performance pages that do not say where the package is slower #401

Done

Description

@seabbs-bot

Read on main at b71b1e4, with the models behind every quoted number re-run (all match).
The fixed items from the #366 review are done: the four wrong statements, the renames in the docstrings and the API overview, the two-meaning symbols on that page, and most pointer sentences.
Every tutorial section now gives its maths first, and no tutorial prints arrays.
What is left, ranked:

  1. Eleven tutorials, against six.
    Lines: renewal 149, vaccination 106, imports 61, clinical 103, forecasting 60, reproduction number 113, latent 285, spatial 271, time-varying 214, occupancy 239, branching 218.
    renewal-then-delay.jl repeats the overview's renewal, delay and depletion steps; forecasting.jl repeats operators.md:57-77; clinical-outcomes.jl:69-77 repeats time-units.md:47-54.
    Fold imports, forecasting and clinical outcomes into Renewal then delay without its copy of the overview, and trim latent processes and spatial strata under 250 lines.
  2. The Performance sections are not honest in prose.
    Several plots show the package slower than the hand loop and the page says nothing: occupancy (forward 12.8 against 4.3 µs; ForwardDiff 3,619 against 825), vaccination (ForwardDiff 3,908 against 1,514), reproduction number (ForwardDiff 6,056 against 3,758), latent processes (Enzyme 3.5 against 1.7).
    README.md:23 still says "close to or faster than a hand-written loop".
    Every docs.csv row is at df005c5, before Write a traced call's trace in its step; join its output in place #348 and Cut dual-number work in Depletion flows and independent runs #393 (which targets the Depletion-flow gap), so regenerate first (Regenerate docs.csv on main b71b1e4 #400), then say where the package is slower and soften the README line.
    Also: no page says how its hand loop is written, or that the reverse-mode hand loop is plain AD while the package uses its rules; and four pages time a different model from the one they show (spatial: 5 strata with floored depletion against 3 patches with hazard; branching; occupancy; latent processes: an AR(2) only).
  3. README and overview maths disagree with their code on the seed days.
    README.md:37 and index.md:200 sum infections back before day 1, and README.md:48 says town A has 10 infections on each of those days, but delay(infections; gain = 0.4) takes them as zero: on day 1 in town A the maths gives 4.0 reports and the code 0.
    Pass history = seed to the delay, or say in the maths that reports start from day 1's infections.
  4. Eight concepts still have two or more homes: the step equation (api-overview.md:33-38, shapes-and-couplings.md:42, adjoints-and-backends.md:19), the modifier chain, the hazard form (five places), the floor form (index.md:274 and renewal-then-delay.jl:84, with two different formulas), the delay, change points, the lag origin and the time base.
    Start with the floor form.
  5. Renames not finished: operators.md:44 (g_4 for the gain), shapes-and-couplings.md:29 (κ * Recent(7) where the API overview uses β) and :59, spatial-strata.jl:242, the domain guide's Routes((C₁, w₁), …) (infectious-disease-models.md:25), and transform.jl's offspring matrix (K in the maths, M in the code).
  6. Symbols with two meanings on one page: the domain guide's C (reports, a coupling, the confirmed ward, a capacity) and M; κ in latent processes; q and k in transform; e in vaccination; D in time-varying delays.
  7. One symbol per concept: the pool is s in the overview and S in four tutorials; the delay is w_l, d_l and w_ij in different places.
  8. Overview order: the Performance section (index.md:256-266) speaks of "the package's rules" before Gradients (:323) defines a rule; move it after.
    "Changing the model" does not run as shown: Floor and Add are imported in a hidden line (:263), and ι (:284) is defined only inside a details block (:312).
  9. New pointer sentences: each tutorial's "It builds on" line (two in a row at renewal-then-delay.jl:5-7), time-varying-delays.jl:149, latent-processes.jl:36, modifiers.md:43, index.md:349, README.md:23.
  10. New features: transpose has no example of when to use it; the reproduction-number ratio has four homes (api-overview.md:115-116, the tutorial, the domain guide and the docstring); reproduction_number is never shown in use.

Smaller: index.md:185 says infections peak while R is 1.3 with no reason; time-varying-delays.jl:29 calls μ_t "means"; time-varying-delays.jl:60 names the internal Secondary() unqualified; an unlisted draft threads-and-gpus.jl remains.

Activity

  1. added
    documentation
    on Oct 28, 2026
  2. seabbs-bot commented on Nov 3, 2026

    @seabbs-bot
    CollaboratorAuthor

    Status at f3fb062 (3 November): of the ten items, none is done, five are partly done and five untouched.
    Good and unchanged: the README is the finished model, the overview builds it step by step with a plot per step, every tutorial gives maths first and prints no arrays.

    item status
    1. six tutorials not done: still 11 (docs/pages.jl:35-45); time-varying grew 214 to 245 lines; threads-and-gpus.jl still present
    2. honest Performance partly: docs.csv regenerated (#400) and each section names its model and "a preallocated hand-written loop"; no section says where the package is slower (occupancy forward 9.7 against 4.4 µs, ForwardDiff 1,916 against 777; vaccination and reproduction number ForwardDiff; latent Enzyme 3.3 against 1.7); README.md:23 unchanged; the caption (docs/performance.jl:40-43) does not say the hand loop is plain AD; spatial and latent still time a different model
    3. seed days partly: index.md:71 now says infections before day 1 count as zero, for the one-town step only; README.md:37, 48, 69 and index.md:200, 211, 219 unchanged. Confirmed: town A's day-1 reports are 0 in the code and 4.0 with history = seed, which matches the maths, and operators.md:108 itself says to pass the seed as the delay's history
    4. one home per concept not done; the floor form is now written three ways (index.md:262, renewal-then-delay.jl:83, the Floor docstring with α)
    5. renames partly (Routes, movement done); operators.md:44, shapes-and-couplings.md:30, 61-85, spatial-strata.jl:242, the domain guide :25 remain
    6. two-meaning symbols not done
    7. one symbol per concept not done (s/S; w_l/d_l)
    8. overview order not done (Performance at index.md:244 before Gradients at :311; hidden Floor/Add import at :251; ι used at :272, defined at :300)
    9. pointer sentences not done ("It builds on" in all 11 tutorials)
    10. new features partly: reproduction_number is gone; transpose has only a table row; the R_t ratio has four homes

    Ranked next steps: unblock the docs build (#420: add FFTA to docs/Project.toml with a compat bound now, fix the extension later); after #418 merges, one sentence per Performance section naming the slower targets, and README.md:23 changed to say the package is faster in reverse mode while the forward run and ForwardDiff are level or up to 2.6x slower; pass history = seed in the README and overview and regenerate the figure; then the six-tutorial fold, the floor form and step equation homes, and the overview order.
    On #414 (executed samples), see the review there.


    Generated by Claude Code

  3. seabbs-bot commented on Nov 4, 2026

    @seabbs-bot
    CollaboratorAuthor

    Status at 455b7fd.
    Three things changed since the last comment.
    First, #418 regenerated benchmark/results/docs.csv on main, so every row is now at f3fb062.
    Second, #425 fixed the FFTA ambiguity (#420), and the Documenter build passes on main at 455b7fd.
    Third, #416 made the overview's hidden import Floor, Transform (docs/src/getting-started/index.md:251), and no page still names Add, Clamp, SoftTruncate, movement or Routes.
    Not done: there are still 11 tutorials (docs/pages.jl:35-45), and README.md:23 still says "close to or faster than a hand-written loop".
    No Performance section says where the package is slower.
    README.md:69 and index.md:219 still call delay(infections; gain = 0.4) with no history = seed.
    Performance (index.md:244) still comes before Gradients (:311).
    Next step: now that #418 is in, add one sentence to each Performance section that names its slower targets, using the ratios in #417, and soften README.md:23 to match.


    Generated by Claude Code

  4. seabbs commented on Nov 21, 2026

    @seabbs
    Member

    Status on main at f51707f.

    item status
    1. six tutorials not done. There are 12 tutorial files (backend case study included), and the fold of imports, forecasting and clinical outcomes into Renewal then delay is open. The draft threads-and-gpus.jl is deleted by #795.
    2. honest Performance done. The README says Mooncake and Enzyme are a median 4.1× and 2.4× faster, and that the forward run and ForwardDiff are slower on several models, with a link to the benchmarks. docs/performance.jl lists the slower cases per target (slower_cases). The caption says when the reverse bars run with the rules.
    3. seed days done. The README and three-towns pass history = seed to the delay.
    4. one home per concept partly done. #800 writes the floor form in renewal-then-delay.jl as the Floor docstring and three-towns do. The pages still restate it, and the step equation and the hazard form still appear in more than one place.
    5. renames done. g_4, κ * Recent, Routes and the domain guide's C₁ are gone, and the spatial plot names routes as K_r, g_r.
    6–7. symbols done on the pages checked. Latent processes uses κ once, for the saturation, and the domain guide's survival is \bar F_l.
    8. overview order done. Performance follows Gradients, and "Changing the model" imports Floor, Transform in view, with ι defined in the shown loop.
    9. pointer sentences done. No "It builds on" remains except in the draft #795 deletes.
    10. new features done. The transpose has an example on the API overview (reported share by T), and reproduction_number is gone. The R_t ratio still has several homes (API overview, tutorial, domain guide, pressure docstring).
    smaller done. means is named as the code's name for \mu_t, and Secondary() is qualified and linked.

    What remains (item 1, and the rest of item 4) is content consolidation: which tutorials to fold, and which page each concept lives on.


    Generated by Claude Code

  5. seabbs commented on Nov 21, 2026

    @seabbs
    Member

    Item 1 (the tutorial fold) and the broad part of item 4 (each concept's single home) wait on a maintainer call. No tutorial will be folded or deleted until then.


    Generated by Claude Code

  6. seabbs-bot commented on Nov 23, 2026

    @seabbs-bot
    CollaboratorAuthor

    #828 settles the one-home part of item 4 for the API overview and the How it works pages.

    • The step equation now has one home, Operators "A step" (explanation-step).
      The overview and Adjoints and backends link to it and no longer restate it.
    • The delay masses, the depletion forms, data shapes, the time-series processes and the transpose share formula each have one home on the most specific page.
      Each overview section is now a short signpost.
    • ONE_HOME in test/package/standards_config.jl gains a check for each of these, so a second copy fails the standards tests.
    • The R_t ratio (item 10) now sits only in the call table on Operators among these pages.
      The tutorial, the domain guide and the pressure docstring still mention it.

    Still open: the hazard and floor forms are restated in three-towns, some tutorials and the domain guide, and the tutorial fold (item 1) waits on a maintainer call.


    Generated by Claude Code

  7. seabbs-bot commented on Dec 1, 2026

    @seabbs-bot
    CollaboratorAuthor

    Outcome: resolved, apart from the tutorial fold, which is declined; closed

    Each item was checked against the docs on the redesigned branch (#907 at 21fb0bb).
    The overview is now docs/src/getting-started/three-towns.md.

    Item Status Evidence
    1. Fold eleven tutorials into six Declined See below
    2. Performance sections say where the package is slower Resolved README.md:21 now says only "The aim is the speed of hand-written loops". docs/src/performance/summary.md gives each example's ratios, counts the examples slower than each alternative, and links the table that names the slower cases, all generated from benchmark/results/docs.csv
    3. Seed days in the README and overview Fixed README.md:69 and three-towns.md:199: delay(infections; gain = 0.4, history = seed)
    4. Concepts with two homes, the floor form first Fixed for the floor Its three homes agree: renewal-then-delay.jl:80, the Floor docstring and three-towns.md:261. The step equation has one home, operators.md:11
    5. Renames Fixed No g_4, Routes( or κ * Recent; transform.jl:30 and :100 name the offspring matrix K in maths and K_house in code
    6. Symbols with two meanings Fixed In the domain guide C is reports only and M the movement share; κ in latent processes, q in transform and vaccination, and D in time-varying delays each have one meaning in their section
    7. One symbol per concept Fixed in the docs The pool is S in the overview and every tutorial. Docstrings write a modifier's state as s, the argument of step(m, θ, v, s)
    8. Overview order Fixed Gradients (three-towns.md:280) comes before Performance (:317); Floor and Transform are imported in a shown line (:246)
    9. Pointer sentences Fixed No "It builds on" line is left
    10. New features Resolved operators.md:93-100 shows when to use the transpose. The reproduction ratio has its tutorial. growth_rate is not shown, as it is listed for removal in #916
    Smaller points Fixed threads-and-gpus.jl is deleted; means and Secondary() are qualified

    Why the fold is declined

    The item asks to fold imported cases (60 lines), forecasting (60) and clinical outcomes (98) into Renewal then delay (144), and to keep every tutorial under 250 lines.
    The folded page would be about 360 lines, over the limit the same item sets.
    Each of the three is a one-screen page that answers one question, and the navigation lists them by task.
    Latent processes (270 lines) and spatial models (265) are still over 250; trimming them is a prose edit with no technical change, and can be done with the next edit of either page.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions