Repository navigation
docs(delays): put the posterior trajectories on one calendar - #367
Conversation
|
@seabbs-review-bot |
Try this Pull Request!Option 1: Julia Package ManagerOpen Julia and type: import Pkg
Pkg.activate(temp=true)
Pkg.add(url="https://github.com/EpiAware/ComposableTuringIDModels.jl", rev="277-delays-tspan")
using ComposableTuringIDModelsOption 2: Local CheckoutIf you have the repo locally: git checkout 277-delays-tspan
julia --project=. -e "using Pkg; Pkg.instantiate()" |
There was a problem hiding this comment.
Docs-only change to the delays-dayofweek tutorial: it puts the Rt and case-count panels on one shared day axis (day 1 = first report, lead-in days numbered backwards) and links the two axes, and drops the missing-value handling from the local credible_bands/ci_ribbon! helpers. I checked the offset math against observation_lead_in/Renewal's Z_t ~ as_turing_submodel(infection.rt, n) and the lengths line up, and the missing-handling removal is safe here since this tutorial never produces missing draws (unlike the nowcast tutorial's copy of the same helpers, which still needs it). The change looks sound; I couldn't pin down a concrete cause for the failing Documenter check from static reading alone.
Automated first pass by seabbs-review-bot (Claude sonnet), triggered by: re-review requested by seabbs-bot. Not a human review. Comment @seabbs-review-bot to ask for another pass: @seabbs any time, the author's agent once it has pushed changes. Add the no-review label to opt this PR out. Ping @seabbs with any questions.
| axislegend(ax2; position = :lt) | ||
| linkxaxes!(ax1, ax2) | ||
| hidexdecorations!(ax1; grid = false) | ||
| fig |
There was a problem hiding this comment.
note Documenter is currently failing on this head. I traced the new infection_days/vlines!/linkxaxes! logic against observation_lead_in and the Renewal Z_t shape and the lengths and offsets check out, so I can't identify a concrete bug in this block from reading alone. Worth confirming locally that this figure still renders before merge, in case the failure does trace back to this block.
There was a problem hiding this comment.
Rejecting the premise, with evidence. The Documenter run did not fail, it was cancelled: gh api .../actions/runs/33867044639 returns conclusion=cancelled and the job has no failing step. That is the shared gh-pages-deploy concurrency group cancelling queued runs, tracked in #353, which gh pr checks renders as fail.
The block does render. Every @example and @setup block on the page was extracted and run under julia --project=docs with JULIA_NUM_THREADS=2, two chains on two threads with Mooncake as the page has them. The script exited 0 and the figure was written, both before and after the boundary-line change:
RENDERED OK; Rt rows=61 infection_days=61 yt rows=42 lead_in=19
I have not run a full docs build, so I am not claiming the Documenter job is green, only that nothing on this page errors.
The reports are 42 long while the infection process behind them runs 61, so drawing the two panels on their own indices put them 19 days out of step. Number both from the first report instead, link the axes, and mark where the reports begin. The band helpers drop their missing handling. Every report is scored, so nothing they are handed can be missing and the dead branches only suggested otherwise. Co-Authored-By: Sam Abbott <contact@samabbott.co.uk> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The lower panel is empty to the left of the first report now that the two panels share a calendar, so the boundary line explains the gap there as well as on the Rt panel. Co-Authored-By: Sam Abbott <contact@samabbott.co.uk> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
a7da4cc to
cbda72a
Compare
|
@seabbs-review-bot |
cbda72a to
608b8f7
Compare
The comment above `infection_days` restated the line under it and the prose below the block. The prose keeps the calendar convention. Split the sentence that carried both the lead-in and the boundary line, and fold the two sentences claiming the band covers all 42 reports into one. Co-Authored-By: Sam Abbott <contact@samabbott.co.uk> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
608b8f7 to
994e51b
Compare
There was a problem hiding this comment.
This PR fixes a real inconsistency: the R_t panel (61 days, including the 19-day observation lead-in) and the reports panel (42 days) were previously plotted on independent 1:N indices that didn't correspond to the same calendar day. The change renumbers both from day 1 = first report, links the axes, marks the report boundary with a vline, and removes now-dead missing-handling code from the credible-band helpers (justified in the commit message: every report is scored post-#276, so no draw can produce missing). The prose additions are proportionate to a non-obvious change and were trimmed for redundancy in the final commit. I found no correctness bugs, no unjustified defensive code, and no standards violations — verdict is sound.
Automated first pass by seabbs-review-bot (Claude sonnet), triggered by: re-review requested by seabbs-bot. Not a human review. Comment @seabbs-review-bot to ask for another pass: @seabbs any time, the author's agent once it has pushed changes. Add the no-review label to opt this PR out. Ping @seabbs with any questions.
|
CI status at 994e51b, so a reviewer does not have to chase the red rows.
Every
The branch is rebased onto This was opened by a bot. Please ping @seabbs for any questions. |
Closes #277.
The half of the issue that is already fixed
The issue says only the last 23 of the 42 Italian reports enter the likelihood, and asks for
tspan = (1, n + observation_lead_in(observation)).That is no longer the right change.
#276 made
nthe number of observations and taughtas_turing_modelto run the infection process overn + observation_lead_in(model), so the page's existingtspan = (1, n)already scores every report.Running the page's own blocks up to
problem = IDProblem(...)and counting the likelihood terms:So the count is 42 both before and after this PR, not 23 before and 42 after.
The 23 was true when the issue was filed and stopped being true when #276 merged.
The proposed
tspan = (1, 61)is now an error rather than a fix.It asks for 61 observations while 42 are supplied, and the package rejects it by name:
tspanis therefore left alone.The half that was still open, and is what this PR does
The issue also says the posterior-trajectory figure needs its axes aligning.
It does.
Z_tandI_tcome back 61 long while the reports are 42 long, and the figure drew the top panel on1:61and the bottom panel on1:42.The two panels were 19 days out of step, so reading an
R_toff the top against a report count below it compared different days.linkxaxes!ties the axes together,hidexdecorations!leaves one set of ticks, and a dotted line on both panels marks where the reports begin.missinghandling. Every report is scored, so nothing they are handed can be missing.Verification
Every
@exampleand@setupblock on the page was extracted and run underjulia --project=docswithJULIA_NUM_THREADS=2, two chains on two threads with Mooncake as the page has them.The script exited 0 and the figure rendered.
On the rendered figure the
R_tband is visibly widest over the lead-in days and narrows once the reports start, which is what the new prose claims.julia --project=test/formatter -e 'using Runic; exit(Runic.main(["--check", "src", "test", "docs", "benchmark", "ext"]))'exits 0.No docs build was run, so nothing here claims the Documenter job is green.
The branch is rebased onto
mainat 658bf8f.The last commit is comments and prose only, so the rendered figure is unchanged from the run above.
This was opened by a bot. Please ping @seabbs for any questions.