Skip to content

Port upstream stochtree fixes through 2026-10-05 - #16

Merged
dwachsmuth merged 1 commit into
mainfrom
claude/upstream-port-202610
Nov 12, 2026
Merged

dwachsmuth merged 1 commit into
mainfrom
claude/upstream-port-202610

Conversation

@dwachsmuth

Copy link
Copy Markdown

Reviews upstream StochasticTree/stochtree main up to 737f397 (5 Oct 2026) and ports the changes that apply to nashtree. The fork point is upstream 5c09ac7 (22 Jul 2026). Of upstream's 18 commits since then, four are our own sampler fixes (upstream StochasticTree#425–StochasticTree#428), which nashtree already has.

Ported

Version bumped to 0.4.6.9012. NEWS and NASH-FORK.md updated.

Not ported

  • Eigen 3.4.1 → 5.0.1 (28794fe, 9ff40f6) and Eigen::placeholders::all (9c4dcd4, only needed under Eigen 5). It would replace the bundled linear-algebra library for no functional gain and puts bitwise-reproducible refits at risk.
  • .gitmodules, Python tests, upstream NEWS and contributor credits: these don't apply to the generated R package.
  • Open upstream Use <cmath> for lgamma StochasticTree/stochtree#419 (std::lgamma instead of boost::math::lgamma): not merged upstream, and it could change the last bits of the variance-forest marginal likelihood.

Evidence (Apple silicon)

  • Full suite with NOT_CRAN=true on an installed scratch build: 2,148 expectations, 0 failures, 0 errors, 2 skips. That's the existing 2,145 plus the 3 new checks. All existing bitwise fixtures pass, including the cloglog ones in outcome-paths-reference.rds.
  • I compared unpatched main (4ccb569) with this branch on the same seeds. These were bitwise identical: the outcome reference set (Gaussian, weighted, variance forest, probit with random effects, cloglog binary and ordinal), twelve more cloglog fits (binary and ordinal, started from the root and from GFR draws) and an NB fit. So in practice the uninitialized value happened to be harmless here. The fix removes undefined behaviour without changing draws.

Not checked: Linux and curbcut-1 builds. nash's pin is unaffected until it moves.

🤖 Generated with Claude Code

Ports StochasticTree/stochtree StochasticTree#417, StochasticTree#418, StochasticTree#420, StochasticTree#421 and the
exact-posterior MCMC test from StochasticTree#431. The cloglog active-forest
initializer no longer reads an uninitialized starting value; seeded
draws are bitwise unchanged. The Eigen 5 upgrade is deliberately not
ported (see NASH-FORK.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dwachsmuth
dwachsmuth marked this pull request as ready for review November 12, 2026 14:59
@dwachsmuth
dwachsmuth merged commit f805419 into main Nov 12, 2026
2 checks passed
@dwachsmuth
dwachsmuth deleted the claude/upstream-port-202610 branch November 12, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant