Skip to content

fix backwards compat just in case#1375

Merged
penelopeysm merged 1 commit into
mainfrom
py/pw
Apr 28, 2026
Merged

fix backwards compat just in case#1375
penelopeysm merged 1 commit into
mainfrom
py/pw

Conversation

@penelopeysm
Copy link
Copy Markdown
Member

#1331 changed the type parameters on PointwiseLogProb. While this isn't exported, I realised that it's kind of necessary to use upstream (e.g. in FlexiChains). To avoid breakage, this patch introduces a second constructor for backwards compatibility.

@penelopeysm penelopeysm merged commit 7d85366 into main Apr 28, 2026
20 checks passed
@penelopeysm penelopeysm deleted the py/pw branch April 28, 2026 17:55
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 28, 2026

Benchmark Report

  • this PR's head: bdc140a095e2dba548c5d18d5124bcaade5a06d8
  • base branch: 7d8536659fe012824bac28315788b545c291435a

Computer Information

Julia Version 1.11.9
Commit 53a02c0720c (2026-02-06 00:27 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 4 × Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, icelake-server)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)

Benchmark Results

┌───────────────────────┬───────┬─────────────┬────────┬───────────────────────────────┬────────────────────────────┬─────────────────────────────────┐
│                       │       │             │        │       t(eval) / t(ref)        │     t(grad) / t(eval)      │        t(grad) / t(ref)         │
│                       │       │             │        │ ─────────┬──────────┬──────── │ ───────┬─────────┬──────── │ ──────────┬───────────┬──────── │
│                 Model │   Dim │  AD Backend │ Linked │     base │  this PR │ speedup │   base │ this PR │ speedup │      base │   this PR │ speedup │
├───────────────────────┼───────┼─────────────┼────────┼──────────┼──────────┼─────────┼────────┼─────────┼─────────┼───────────┼───────────┼─────────┤
│               Dynamic │    10 │    mooncake │   true │   280.34 │   358.13 │    0.78 │   8.22 │    6.25 │    1.32 │   2304.50 │   2238.44 │    1.03 │
│                   LDA │    12 │ reversediff │   true │  2532.20 │  2549.33 │    0.99 │   2.13 │    2.50 │    0.85 │   5390.84 │   6366.59 │    0.85 │
│   Loop univariate 10k │ 10000 │    mooncake │   true │ 30664.98 │ 32098.31 │    0.96 │   6.52 │    6.75 │    0.97 │ 199898.56 │ 216508.03 │    0.92 │
├───────────────────────┼───────┼─────────────┼────────┼──────────┼──────────┼─────────┼────────┼─────────┼─────────┼───────────┼───────────┼─────────┤
│    Loop univariate 1k │  1000 │    mooncake │   true │  3123.63 │  3632.90 │    0.86 │   6.37 │    5.85 │    1.09 │  19888.91 │  21262.07 │    0.94 │
│      Multivariate 10k │ 10000 │    mooncake │   true │ 32580.20 │ 49040.03 │    0.66 │   9.69 │    7.32 │    1.32 │ 315814.09 │ 358901.64 │    0.88 │
│       Multivariate 1k │  1000 │    mooncake │   true │  3360.08 │  4551.65 │    0.74 │   9.50 │    7.12 │    1.34 │  31933.24 │  32392.16 │    0.99 │
├───────────────────────┼───────┼─────────────┼────────┼──────────┼──────────┼─────────┼────────┼─────────┼─────────┼───────────┼───────────┼─────────┤
│ Simple assume observe │     1 │ forwarddiff │  false │     0.88 │     0.85 │    1.03 │  10.42 │   11.03 │    0.95 │      9.14 │      9.36 │    0.98 │
│           Smorgasbord │   201 │ forwarddiff │  false │   944.12 │  1070.42 │    0.88 │ 151.45 │   79.05 │    1.92 │ 142991.37 │  84612.41 │    1.69 │
│           Smorgasbord │   201 │      enzyme │   true │  1290.27 │  1438.25 │    0.90 │   4.84 │    4.52 │    1.07 │   6247.26 │   6494.80 │    0.96 │
├───────────────────────┼───────┼─────────────┼────────┼──────────┼──────────┼─────────┼────────┼─────────┼─────────┼───────────┼───────────┼─────────┤
│           Smorgasbord │   201 │ forwarddiff │   true │  1287.77 │  1439.43 │    0.89 │  69.12 │   68.33 │    1.01 │  89017.32 │  98361.61 │    0.91 │
│           Smorgasbord │   201 │    mooncake │   true │  1283.29 │  1452.21 │    0.88 │   4.74 │    3.86 │    1.23 │   6081.06 │   5608.80 │    1.08 │
│           Smorgasbord │   201 │ reversediff │   true │  1291.26 │  1430.27 │    0.90 │ 127.59 │  127.15 │    1.00 │ 164756.04 │ 181856.21 │    0.91 │
├───────────────────────┼───────┼─────────────┼────────┼──────────┼──────────┼─────────┼────────┼─────────┼─────────┼───────────┼───────────┼─────────┤
│              Submodel │     1 │    mooncake │   true │     0.88 │     0.92 │    0.95 │  26.33 │   29.69 │    0.89 │     23.10 │     27.39 │    0.84 │
└───────────────────────┴───────┴─────────────┴────────┴──────────┴──────────┴─────────┴────────┴─────────┴─────────┴───────────┴───────────┴─────────┘

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.26%. Comparing base (81fe531) to head (bdc140a).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/accumulators/pointwise_logdensities.jl 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1375      +/-   ##
==========================================
- Coverage   82.30%   82.26%   -0.05%     
==========================================
  Files          49       49              
  Lines        3510     3512       +2     
==========================================
  Hits         2889     2889              
- Misses        621      623       +2     

☔ View full report in Codecov by Sentry.
📢 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.

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.

1 participant