Skip to content

Resume and extend Bayesian (bumps-DREAM) refinements#204

Merged
AndrewSazonov merged 33 commits into
developfrom
bayesian-resume-and-mcmc-sidecar
Jun 16, 2026
Merged

Resume and extend Bayesian (bumps-DREAM) refinements#204
AndrewSazonov merged 33 commits into
developfrom
bayesian-resume-and-mcmc-sidecar

Conversation

@AndrewSazonov

Copy link
Copy Markdown
Member

You can now pause a Bayesian analysis that uses the bumps-DREAM sampler and later continue it for more steps — exactly as already worked for emcee — without losing the samples collected so far. Reload a saved project and call fit(resume=True, extra_steps=N) to extend the existing chains. Resuming now reliably continues the chain after saving and reloading a project for both emcee and DREAM (previously a reloaded run could silently start over). DREAM sampling also now runs in parallel across CPU cores in notebooks and scripts, making it dramatically faster than before. The MCMC results file stored next to a project is renamed from results.h5 to mcmc.h5 to reflect that it holds MCMC sampling output. The live progress display is now consistent between the two samplers and reports how many of the requested new steps have completed. A new bumps-DREAM resume tutorial demonstrates loading a published project and extending its chain.

@AndrewSazonov AndrewSazonov added the [scope] enhancement Adds/improves features (major.MINOR.patch) label Jun 16, 2026
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.23715% with 50 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.29%. Comparing base (c0ae81f) to head (4bde8f3).

Files with missing lines Patch % Lines
...easydiffraction/analysis/minimizers/bumps_dream.py 78.45% 31 Missing and 8 partials ⚠️
src/easydiffraction/analysis/analysis.py 75.00% 6 Missing and 3 partials ⚠️
src/easydiffraction/project/project.py 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #204      +/-   ##
===========================================
- Coverage    90.35%   90.29%   -0.07%     
===========================================
  Files          283      283              
  Lines        23941    24152     +211     
  Branches      2801     2828      +27     
===========================================
+ Hits         21633    21809     +176     
- Misses        1715     1747      +32     
- Partials       593      596       +3     
Flag Coverage Δ
unittests 90.29% <80.23%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/easydiffraction/__main__.py 96.85% <100.00%> (ø)
...ction/analysis/categories/minimizer/bumps_dream.py 100.00% <100.00%> (ø)
...c/easydiffraction/analysis/fit_helpers/tracking.py 97.19% <100.00%> (ø)
src/easydiffraction/analysis/fitting.py 97.60% <100.00%> (+0.01%) ⬆️
src/easydiffraction/analysis/minimizers/emcee.py 54.81% <100.00%> (+0.66%) ⬆️
src/easydiffraction/io/results_sidecar.py 98.45% <100.00%> (+0.10%) ⬆️
src/easydiffraction/project/project.py 97.80% <66.66%> (-0.53%) ⬇️
src/easydiffraction/analysis/analysis.py 92.95% <75.00%> (-0.51%) ⬇️
...easydiffraction/analysis/minimizers/bumps_dream.py 72.01% <78.45%> (+3.00%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AndrewSazonov AndrewSazonov changed the title Resume and extend Bayesian (bumps-DREAM) refinements — now faster, with clearer progress Resume and extend Bayesian (bumps-DREAM) refinements Jun 16, 2026
@AndrewSazonov AndrewSazonov merged commit 681b195 into develop Jun 16, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[scope] enhancement Adds/improves features (major.MINOR.patch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant