Repository navigation
Evaluate coalescence rates at the terminal augmented time - #2547
jeromekelleher merged 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2547 +/- ##
==========================================
- Coverage 93.82% 93.82% -0.01%
==========================================
Files 20 20
Lines 12228 12224 -4
Branches 2254 2254
==========================================
- Hits 11473 11469 -4
Misses 574 574
Partials 181 181
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
The changes LGTM, but I'm not an expert on this code. @apragsdale - I think you were involved in writing this, would you mind taking a look please? @ArtificialZeng - lint is failing FYI |
|
Thank you for checking this and for asking the relevant author to review it. I have applied the requested Ruff line wrap in commit 5642717. Pinned Ruff 0.15.1 formatting and lint checks now pass locally; the test AST and scientific implementation are unchanged. The synchronized reproduction packet in AI-Biology-Lab PR #33 has also been updated. Its reused native baseline/candidate replay still matches the original 30 regression, 68 analytic-oracle, and 16 existing-case outcomes, with no skips. The new upstream-head Tests, Docs and Lint runs currently require maintainer approval, so I am not claiming they have passed. I appreciate the further review of the rate/event semantics. |
|
It looks fine to me as well. |
A size change at the final augmented trajectory time can leave
coalescence_rate_trajectoryreporting the preceding epoch's hazard. For one population changing from1000 to10000 at time100, query[0,100]returnsr(100)=0.0005instead of the documented1/(2*10000)=0.00005; appending101 makes the value at100 correct. Both default doubled-grid validation and validation-off reproduce this without warnings. Survival at100 remainsexp(-0.05).The proposed change evaluates current population sizes and the existing point-movement block at every augmented grid point, and propagates only when another time follows. It also protects the final duplicate-zero case from an added event application. This addresses terminal instantaneous movements under the same ordering already used at interior points. All epoch breaks are appended internally, so the affected point is the last augmented point, which may differ from the last requested point.
Validation on pinned main
45cfa59d828757352f7ab1a55c19b55102d40d22, CPython3.13/macOS arm64:V2 changes only a new test's bitwise equality to an explicit relative1e-12 comparison; the runtime repair is unchanged. The original frozen evidence remains retained. This remains computational checking rather than external human peer review. The patch retains the existing finite-precision underflow and piecewise-constant growth-propagation conventions. Empty queries naturally change from an internal UnboundLocalError to empty arrays; that was not an established supported-input contract. Earlier duplicate-zero/time-zero behavior is preserved. No ancestry simulation, coalescence-time distribution, mean-TMRCA or affected-publication impact is established by this diagnostic error.
This is an AI-assisted scientific-software contribution. Maintainer review of the intended endpoint contract and repair scope would be appreciated.
Formatting follow-up: commit5642717 applies the requested Ruff line wrap; pinned Ruff0.15.1 checks pass locally and the test AST is unchanged. All13 checks on this exact PR head now pass, including the Tests, Docs and Lint workflows. The synchronized AI-Biology-Lab PR33 head94b4e1f also passes all9 checks and rebuilt native paired evidence. This does not replace specialist review of rate/event semantics.