Skip to content

Integrate EnsembleMCMC through EnsembleProposal - #573

Draft
BJMCox wants to merge 9 commits into
mainfrom
add-affine-invariant-ensemble
Draft

BJMCox wants to merge 9 commits into
mainfrom
add-affine-invariant-ensemble

Conversation

@BJMCox

@BJMCox BJMCox commented Aug 31, 2026 •

Copy link
Copy Markdown
Member

EnsembleProposal uses EnsembleMCMC for stretch, differential evolution, snooker and Gaussian replacement moves, and fixed mixtures. BAT retains its transforms, retry initialization, repetition weights, RNG partitions and coupled-ensemble ESS. Diagnostics include outer cycle counts and cumulative inner-move counts.

The extension supports EnsembleMCMC 0.0.4 through 0.0.6. For 0.0.6 it maps BAT’s Philox and Threefry partitions to PureRNGs keys for initialization and each sweep.

The optional adapter suite replaces the native engine tests and runs in a separate workflow on Julia 1.10 and current Julia. All 38 checks pass on each supported EnsembleMCMC version.

@codecov

codecov Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.58268% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.00%. Comparing base (3ab3baf) to head (dde30e2).
⚠️ Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
src/samplers/mcmc/mcmc_multiproposal.jl 61.11% 14 Missing ⚠️
src/samplers/mcmc/ensemble_proposal.jl 65.62% 11 Missing ⚠️
ext/BATEnsembleMCMCExt.jl 96.36% 2 Missing ⚠️
.../mcmc/mcmc_tuning/mcmc_adaptive_multiprop_tuner.jl 0.00% 1 Missing ⚠️
...plers/mcmc/mcmc_tuning/mcmc_multiproposal_tuner.jl 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #573      +/-   ##
==========================================
+ Coverage   69.19%   71.00%   +1.81%     
==========================================
  Files         123      126       +3     
  Lines        7230     7492     +262     
==========================================
+ Hits         5003     5320     +317     
+ Misses       2227     2172      -55     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@BJMCox
BJMCox force-pushed the add-affine-invariant-ensemble branch from 984f45a to e12d101 Compare September 1, 2026 12:06
@oschulz
oschulz marked this pull request as draft September 7, 2026 07:44
@oschulz

oschulz commented Sep 7, 2026

Copy link
Copy Markdown
Member

Concerted to draft until we're decided if the core of this will go into a separate package.

@BJMCox

BJMCox commented Sep 7, 2026 •

Copy link
Copy Markdown
Member Author

I would think that yes, this should be spun off into a different package unless there is compelling reason otherwise. I will take a look through how integrated this needs to be into BAT.jl before I give a judgement however

@BJMCox

BJMCox commented Sep 7, 2026

Copy link
Copy Markdown
Member Author

I have spun this off into EnsembleMCMC.jl, once I finish touching this up I will register it and we can then redo this PR as an adapter.

@BJMCox

BJMCox commented Sep 7, 2026

Copy link
Copy Markdown
Member Author

This has been spun off into a package here. Once this is registered I will redo this PR as an adapter ext. Keep open in meantime as reminder.

@BJMCox BJMCox changed the title Add an affine-invariant ensemble sampler Integrate EnsembleMCMC through EnsembleProposal Sep 13, 2026
@BJMCox

BJMCox commented Sep 14, 2026

Copy link
Copy Markdown
Member Author

I have updated this to be an adapter to EnsembleMCMC.jl. Note it points at an unreleased version, so cannot be merged. I would hold off on merging this until we have GPU support in BAT.jl, as otherwise we would probably have to rewrite some of this anyway, or at least add to it to expose the CUDA kernels for the moves.

@BJMCox
BJMCox force-pushed the add-affine-invariant-ensemble branch from 3a127e6 to 9b56e28 Compare September 14, 2026 08:53
Keep BAT in charge of transforms, initialization, RNG addresses, sample weights, and diagnostics while EnsembleMCMC owns ensemble transitions. Reuse cached initial densities and expose optional CPU batching and owned transition records with the matching package source pin.
@BJMCox
BJMCox force-pushed the add-affine-invariant-ensemble branch from 286bcae to ef7c145 Compare September 15, 2026 09:57
Resolve EnsembleMCMC 0.0.2 from the registry instead of a pinned Git revision. Remove the matching CI override so optional tests use the declared environment.
Test snooker and the new affine-invariant Gaussian default through BAT,
and check that ThreadedExecutor(min_chunk) replays the serial run. Note
that threading helps only for costly targets.
@BJMCox

BJMCox commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

Now points to registered EnsembleMCMC.jl, but will hold off on further until new MeasureBase in case changes needed

This branch has not been deployed

No deployments
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.

2 participants