Skip to content

support non overlapping switch logp with scaling on both branches#8263

Open
eclipse1605 wants to merge 2 commits into
pymc-devs:mainfrom
eclipse1605:enh-switch-nonoverlap-dual-scale
Open

support non overlapping switch logp with scaling on both branches#8263
eclipse1605 wants to merge 2 commits into
pymc-devs:mainfrom
eclipse1605:enh-switch-nonoverlap-dual-scale

Conversation

@eclipse1605

Copy link
Copy Markdown
Contributor
  • generalized branch parsing to support both branches as either x or a*x, and to recover a shared base variable plus per branch scales.
  • expanded measurable switch rewrite matching from one-sided scaling to dual scaling, while keeping the existing measurable-branches-only design and deterministic scale checks.
  • updated non-overlapping switch logp to gate between branch logps evaluated at observed value, preserving branch inference by value sign.

closes #8050

@codecov

codecov Bot commented Apr 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.87500% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.72%. Comparing base (c32715a) to head (7dc910e).
⚠️ Report is 57 commits behind head on v6.

Files with missing lines Patch % Lines
pymc/logprob/switch.py 96.87% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##               v6    #8263      +/-   ##
==========================================
+ Coverage   91.49%   91.72%   +0.22%     
==========================================
  Files         123      124       +1     
  Lines       19832    19981     +149     
==========================================
+ Hits        18146    18327     +181     
+ Misses       1686     1654      -32     
Files with missing lines Coverage Δ
pymc/logprob/switch.py 83.00% <96.87%> (+2.31%) ⬆️

... and 58 files with indirect coverage changes

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

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.

ENH: support non-overlapping switch logp with scaling on both branches

1 participant