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
Sampler.extend: increasing thin drops retained draws; Ngen is buffer capacity, not generations #267
Findings F-M4, F-M5 in DEEP_ANALYSIS.md (parent #261). Verified against bumps 1.0.4.
sampler.py:446-453 computes old_samples = state.Ngen * state.Npop, but MCMCDraw.Ngen is _gen_draws.shape[0] (allocated capacity); after a short/aborted run this over-requests (benign but wrong accounting).
Retained points live in the thinned buffer sized ceil(n_gen / thinning). Extending a thin=1 chain with the default thin=10 makes resize contract the thin buffer and drop ~90% of previously retained draws — directly contradicting the docstring "guarantees no existing draws are dropped... regardless of the thinning interval" (lines 405-412). thin should default to / be validated against state.thinning.
minimizer_bumps.py:584-589 pop recovery: if the original chain used a fractional scale factor (e.g. pop=2.5, 3 params -> Npop=8), neither ceil nor floor recovery reproduces Npop and DREAM dies with the opaque ValueError("Cannot change Nvar, Npop or Ncr on resize"). Robust fix: pass pop = -resume_state.Npop (bumps absolute-count convention). Also sampler_kwargs can override 'pop' after this resolution (lines 610-611).
Activity