Skip to content

Seed RNG inside model_dimension() #923

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 1 commit into from
May 19, 2025
Merged

Seed RNG inside model_dimension() #923

merged 1 commit into from
May 19, 2025

Conversation

penelopeysm
Copy link
Member

@penelopeysm penelopeysm commented May 16, 2025

Closes #905. The problem is that there were certain parameter values that would cause link(vi, model) to fail.

Copy link
Contributor

github-actions bot commented May 16, 2025

Benchmark Report for Commit e89a68a

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.6 |                 1.6 |
|           Smorgasbord |       201 | forwarddiff |             typed |  false |                743.8 |                37.4 |
|           Smorgasbord |       201 | forwarddiff | simple_namedtuple |   true |                305.2 |                68.2 |
|           Smorgasbord |       201 | forwarddiff |           untyped |   true |               1272.4 |                27.2 |
|           Smorgasbord |       201 | forwarddiff |       simple_dict |   true |               3306.6 |                24.7 |
|           Smorgasbord |       201 | reversediff |             typed |   true |               1478.6 |                29.3 |
|           Smorgasbord |       201 |    mooncake |             typed |   true |                973.0 |                 5.5 |
|    Loop univariate 1k |      1000 |    mooncake |             typed |   true |               5547.8 |                 4.1 |
|       Multivariate 1k |      1000 |    mooncake |             typed |   true |               1088.7 |                 9.9 |
|   Loop univariate 10k |     10000 |    mooncake |             typed |   true |              61602.5 |                 3.7 |
|      Multivariate 10k |     10000 |    mooncake |             typed |   true |               9451.3 |                 9.4 |
|               Dynamic |        10 |    mooncake |             typed |   true |                134.9 |                13.7 |
|              Submodel |         1 |    mooncake |             typed |   true |                 14.2 |                 6.2 |
|                   LDA |        12 | reversediff |             typed |   true |                468.8 |                 6.1 |

Copy link

codecov bot commented May 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.10%. Comparing base (b0ff259) to head (e89a68a).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #923   +/-   ##
=======================================
  Coverage   85.10%   85.10%           
=======================================
  Files          36       36           
  Lines        3954     3954           
=======================================
  Hits         3365     3365           
  Misses        589      589           

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

@coveralls
Copy link

Pull Request Test Coverage Report for Build 15075859865

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 22 unchanged lines in 11 files lost coverage.
  • Overall coverage decreased (-4.9%) to 80.215%

Files with Coverage Reduction New Missed Lines %
ext/DynamicPPLEnzymeCoreExt.jl 1 0.0%
ext/DynamicPPLForwardDiffExt.jl 1 63.64%
src/sampler.jl 1 89.23%
src/simple_varinfo.jl 1 75.14%
src/varnamedvector.jl 1 89.36%
src/contexts.jl 2 74.79%
src/logdensityfunction.jl 2 52.27%
src/model.jl 2 84.17%
src/utils.jl 2 73.8%
src/values_as_in_model.jl 3 59.52%
Totals Coverage Status
Change from base Build 14935073817: -4.9%
Covered Lines: 3138
Relevant Lines: 3912

💛 - Coveralls

@coveralls
Copy link

coveralls commented May 16, 2025

Pull Request Test Coverage Report for Build 15098387875

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 22 unchanged lines in 11 files lost coverage.
  • Overall coverage remained the same at 85.19%

Files with Coverage Reduction New Missed Lines %
ext/DynamicPPLEnzymeCoreExt.jl 1 0.0%
ext/DynamicPPLForwardDiffExt.jl 1 63.64%
src/sampler.jl 1 89.23%
src/simple_varinfo.jl 1 75.14%
src/varnamedvector.jl 1 89.36%
src/contexts.jl 2 74.79%
src/logdensityfunction.jl 2 52.27%
src/model.jl 2 84.17%
src/utils.jl 2 73.8%
src/values_as_in_model.jl 3 59.52%
Totals Coverage Status
Change from base Build 15098141060: 0.0%
Covered Lines: 3365
Relevant Lines: 3950

💛 - Coveralls

Copy link
Contributor

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

@penelopeysm penelopeysm merged commit 27d4378 into main May 19, 2025
17 of 18 checks passed
@penelopeysm penelopeysm deleted the py/benchmarks-rng branch May 19, 2025 10:01
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.

Benchmarks fails indeterministically
3 participants