Skip to content

Emit scalar DEMetropolis "scaling" stat#8178

Merged
ricardoV94 merged 1 commit into
pymc-devs:mainfrom
michaelosthege:fix-metropolis-tests
Mar 8, 2026
Merged

Emit scalar DEMetropolis "scaling" stat#8178
ricardoV94 merged 1 commit into
pymc-devs:mainfrom
michaelosthege:fix-metropolis-tests

Conversation

@michaelosthege
Copy link
Copy Markdown
Member

@michaelosthege michaelosthege commented Mar 8, 2026

Replaces #8172 by doing the same fix already done in #7871, closing #8169.

Follow-up to #8015 that tracks warmup information independent of stats on IBaseTrace/NDarray backends:

  • IBaseTrace.warmup_count() for counting the total number of warmup steps
  • _sample_return switches to using warmup_count() instead of relying on tune parameter. This works also when chains do not have the same number of warmup iterations.

not worth it I guess

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

Like done with other Metropolis step methods.
@ricardoV94
Copy link
Copy Markdown
Member

@michaelosthege we have two branches going on now, v6 (default) and main (bugfixes). For this one let's target main still and then I'll cherry pick it to v6. It will also get rid of the extra commits it's picking

@ricardoV94 ricardoV94 changed the base branch from v6 to main March 8, 2026 14:38
@read-the-docs-community
Copy link
Copy Markdown

read-the-docs-community Bot commented Mar 8, 2026

Documentation build overview

📚 pymc | 🛠️ Build #31712666 | 📁 Comparing b0a0631 against latest (a71f643)


🔍 Preview build

Show files changed (2 files in total): 📝 2 modified | ➕ 0 added | ➖ 0 deleted
File Status
glossary.html 📝 modified
_modules/pymc/step_methods/metropolis.html 📝 modified

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 8, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.01%. Comparing base (a71f643) to head (5c7a87c).

Files with missing lines Patch % Lines
pymc/backends/ndarray.py 72.72% 3 Missing ⚠️
pymc/backends/mcbackend.py 50.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (a71f643) and HEAD (5c7a87c). Click for more details.

HEAD has 9 uploads less than BASE
Flag BASE (a71f643) HEAD (5c7a87c)
27 18
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8178      +/-   ##
==========================================
- Coverage   84.56%   79.01%   -5.55%     
==========================================
  Files         124      124              
  Lines       19866    19873       +7     
==========================================
- Hits        16799    15703    -1096     
- Misses       3067     4170    +1103     
Files with missing lines Coverage Δ
pymc/backends/base.py 80.51% <100.00%> (-7.75%) ⬇️
pymc/sampling/mcmc.py 73.46% <100.00%> (-17.15%) ⬇️
pymc/step_methods/metropolis.py 90.10% <ø> (-3.01%) ⬇️
pymc/backends/mcbackend.py 21.58% <50.00%> (-77.70%) ⬇️
pymc/backends/ndarray.py 65.51% <72.72%> (-14.49%) ⬇️

... and 56 files with indirect coverage changes

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

@michaelosthege michaelosthege changed the title Emit scalar DEMetropolis "scaling" stat and track warmup count on IBaseTrace Emit scalar DEMetropolis "scaling" stat Mar 8, 2026
@ricardoV94 ricardoV94 merged commit a8225f9 into pymc-devs:main Mar 8, 2026
39 of 42 checks passed
@michaelosthege michaelosthege deleted the fix-metropolis-tests branch March 8, 2026 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants