Skip to content

Move bijector(dynamicpplmodel) from Turing.jl #920

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 18, 2025

Conversation

Red-Portal
Copy link
Member

This moves the bijector specialization that extracts a bijector from a DynamicPPL Model, which was in Turing.jl

Copy link
Contributor

github-actions bot commented May 14, 2025

Benchmark Report for Commit 6950cec

Computer Information

Julia Version 1.11.5
Commit 760b2e5b739 (2025-04-14 06:53 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 4 × AMD EPYC 7763 64-Core Processor
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)

Benchmark Results

|                 Model | Dimension |  AD Backend |      VarInfo Type | Linked | Eval Time / Ref Time | AD Time / Eval Time |
|-----------------------|-----------|-------------|-------------------|--------|----------------------|---------------------|
| Simple assume observe |         1 | forwarddiff |             typed |  false |                  9.3 |                 1.5 |
|           Smorgasbord |       201 | forwarddiff |             typed |  false |                751.9 |                32.0 |
|           Smorgasbord |       201 | forwarddiff | simple_namedtuple |   true |                413.0 |                44.0 |
|           Smorgasbord |       201 | forwarddiff |           untyped |   true |               1195.0 |                27.1 |
|           Smorgasbord |       201 | forwarddiff |       simple_dict |   true |               3401.9 |                22.5 |
|           Smorgasbord |       201 | reversediff |             typed |   true |               1442.0 |                30.1 |
|           Smorgasbord |       201 |    mooncake |             typed |   true |                960.6 |                 5.2 |
|    Loop univariate 1k |      1000 |    mooncake |             typed |   true |               5352.9 |                 4.1 |
|       Multivariate 1k |      1000 |    mooncake |             typed |   true |                988.7 |                 9.0 |
|   Loop univariate 10k |     10000 |    mooncake |             typed |   true |              60440.7 |                 3.7 |
|      Multivariate 10k |     10000 |    mooncake |             typed |   true |               8928.9 |                 9.6 |
|               Dynamic |        10 |    mooncake |             typed |   true |                133.9 |                12.9 |
|              Submodel |         1 |    mooncake |             typed |   true |                 13.0 |                 6.4 |
|                   LDA |        12 | reversediff |             typed |   true |                473.6 |                 5.7 |

@coveralls
Copy link

Pull Request Test Coverage Report for Build 15031798993

Details

  • 29 of 30 (96.67%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-3.6%) to 81.47%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/bijector.jl 29 30 96.67%
Totals Coverage Status
Change from base Build 14935073817: -3.6%
Covered Lines: 3214
Relevant Lines: 3945

💛 - Coveralls

1 similar comment
@coveralls
Copy link

Pull Request Test Coverage Report for Build 15031798993

Details

  • 29 of 30 (96.67%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-3.6%) to 81.47%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/bijector.jl 29 30 96.67%
Totals Coverage Status
Change from base Build 14935073817: -3.6%
Covered Lines: 3214
Relevant Lines: 3945

💛 - Coveralls

@coveralls
Copy link

coveralls commented May 14, 2025

Pull Request Test Coverage Report for Build 15089611356

Details

  • 29 of 30 (96.67%) changed or added relevant lines in 1 file are covered.
  • 17 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.09%) to 85.19%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/bijector.jl 29 30 96.67%
Files with Coverage Reduction New Missed Lines %
src/model.jl 1 85.83%
src/threadsafe.jl 16 55.05%
Totals Coverage Status
Change from base Build 14935073817: 0.09%
Covered Lines: 3365
Relevant Lines: 3950

💛 - Coveralls

Copy link

codecov bot commented May 14, 2025

Codecov Report

Attention: Patch coverage is 96.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 85.10%. Comparing base (cdeb657) to head (6950cec).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/bijector.jl 96.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #920      +/-   ##
==========================================
+ Coverage   85.01%   85.10%   +0.08%     
==========================================
  Files          35       36       +1     
  Lines        3924     3954      +30     
==========================================
+ Hits         3336     3365      +29     
- Misses        588      589       +1     

☔ 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.

Copy link
Member

@penelopeysm penelopeysm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Red-Portal thanks for this! I've had a look at the code itself and all seems fine.

Before merging, would you be able to:

  • make a patch release in Project.toml
  • add a changelog entry in HISTORY.md?

@Red-Portal Red-Portal requested a review from penelopeysm May 17, 2025 22:19
@Red-Portal
Copy link
Member Author

Done!

Copy link
Contributor

DynamicPPL.jl documentation for PR #920 is available at:
https://TuringLang.github.io/DynamicPPL.jl/previews/PR920/

@Red-Portal
Copy link
Member Author

@penelopeysm I don't have merge rights so someone will have to press a button!

@penelopeysm
Copy link
Member

Oh, I'm sorry! I actually checked and I thought that you'd have merge rights since you're a member of the TuringLang organisation. I guess it might be because it's a merge into main.

@penelopeysm penelopeysm added this pull request to the merge queue May 18, 2025
Merged via the queue into main with commit b0ff259 May 18, 2025
17 of 18 checks passed
@penelopeysm penelopeysm deleted the bijector_of_dynamicpplmodel branch May 18, 2025 17:02
@penelopeysm
Copy link
Member

I triggered a release, so you should be able to use it in a short while.

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.

3 participants