You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
data_requirements(model, blank, n) reports a blank series as supplied, where the missing route reports nothing #384
Splitting this out of #373 rather than widening it.
data_requirements reports a wholly blank series as having supplied its length, while the scalar-missing route reports nothing supplied:
model =IDModel(DirectInfections(; Z =RandomWalk(), initialisation =Normal()),
LatentDelay(PoissonError(), fill(1/5, 5)))
data_requirements(model, Vector{Missing}(missing, 20), 20)
# y_t: 20 values, after a lead-in of 4 — supplied 20data_requirements(model, missing, 20)
# y_t: 20 values, after a lead-in of 4
This is deliberate, and the question is only whether the two routes should agree
n_supplied counts positions in the series, not observations in it, which is why a series with gaps reports its full length too:
full 20 n_supplied=20
2 gaps n_supplied=20
all blank n_supplied=20
That is consistent and was confirmed as intended on #373, where the field docstring has been corrected to say so. So a blank series reporting 20 is right.
What is left is that a scalar missing and a blank series are both "no observations" but report differently. That may be fine: a scalar missing is no data argument at all, which is genuinely a different thing from a series of twenty absent observations. If so this issue closes as documentation.
What NOT to do
Making _n_series_supplied return nothing for all-missing data looks like the tidy fix and is not. It deletes a length check:
as_turing_model(model, Vector{Missing}(missing, 30), 20)
# today: ArgumentError# after that change: builds silently, `_check_stream` returns early on `nothing`
That route was suggested by the review bot on #373 and rejected for this reason. Recording it here so it is not re-proposed.
This was opened by a bot. Please ping @seabbs for any questions.
Closing as documentation, which is the outcome the issue itself proposes.
A scalar missing is no data argument, and a blank series is a series whose positions are all unobserved. n_supplied counts positions, so the two reporting differently is the two being different.
The StreamRequirement docstring on #373 now says that nothing means the requirements were asked for without data, and that a wholly missing series reports its length.
The change this issue warns against, returning nothing for all-missing data, is recorded there too.
Activity
seabbs-bot commentedon Sep 5, 2026
Closing as documentation, which is the outcome the issue itself proposes.
A scalar
missingis no data argument, and a blank series is a series whose positions are all unobserved.n_suppliedcounts positions, so the two reporting differently is the two being different.The
StreamRequirementdocstring on #373 now says thatnothingmeans the requirements were asked for without data, and that a whollymissingseries reports its length.The change this issue warns against, returning
nothingfor all-missing data, is recorded there too.Generated by Claude Code