Skip to content

JET + Mooncake fixes for 1.12 #921

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

JET + Mooncake fixes for 1.12 #921

wants to merge 5 commits into from

Conversation

penelopeysm
Copy link
Member

@penelopeysm penelopeysm commented May 16, 2025

  • Mooncake doesn't precompile on 1.12, which was causing CI to fail on julia-version = pre. This removes it from the test suite if the Julia version is 1.12.

Previously, we knew that CI was failing on 1.12 because of Mooncake. However, removing Mooncake also flagged up a couple more errors that I had to resolve to get CI to pass:

  • JET.jl has a new version, v0.10, that is intended for Julia 1.12. This PR also includes v0.10 in the allowed compat ranges for JET.jl so that the tests can run on pre. Previously, the JET tests on pre would fail as CI would attempt to install an older version of JET that wasn't forward-compatible. Thankfully, this doesn't require runtime checks because Pkg will automatically figure out the appropriate version of JET to install.

  • Finally, this PR disables doctests on 1.12, because error messages vary from version to version and it can be very flaky to test correctly for them.

There is still one remaining test failure on 1.12, which is related to the use of Threads.threadid() in ThreadSafeVarInfo. I wrote up more about this problem in #924.

Supersedes: #872 #873 #875

Copy link
Contributor

github-actions bot commented May 16, 2025

Benchmark Report for Commit d6e9c83

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 |                 10.1 |                 1.5 |
|           Smorgasbord |       201 | forwarddiff |             typed |  false |                765.8 |                33.4 |
|           Smorgasbord |       201 | forwarddiff | simple_namedtuple |   true |                420.7 |                46.2 |
|           Smorgasbord |       201 | forwarddiff |           untyped |   true |               1243.4 |                26.8 |
|           Smorgasbord |       201 | forwarddiff |       simple_dict |   true |               3410.7 |                23.0 |
|           Smorgasbord |       201 | reversediff |             typed |   true |               1474.0 |                30.0 |
|           Smorgasbord |       201 |    mooncake |             typed |   true |                971.0 |                 5.3 |
|    Loop univariate 1k |      1000 |    mooncake |             typed |   true |               5687.3 |                 3.9 |
|       Multivariate 1k |      1000 |    mooncake |             typed |   true |               1028.6 |                 8.8 |
|   Loop univariate 10k |     10000 |    mooncake |             typed |   true |              64489.3 |                 3.6 |
|      Multivariate 10k |     10000 |    mooncake |             typed |   true |               9393.7 |                 9.5 |
|               Dynamic |        10 |    mooncake |             typed |   true |                133.7 |                14.6 |
|              Submodel |         1 |    mooncake |             typed |   true |                 13.8 |                 6.6 |
|                   LDA |        12 | reversediff |             typed |   true |                480.4 |                 5.6 |

Copy link
Contributor

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

Copy link

codecov bot commented May 16, 2025

Codecov Report

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

Project coverage is 11.05%. Comparing base (cdeb657) to head (c25fd4c).

Files with missing lines Patch % Lines
src/threadsafe.jl 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #921       +/-   ##
===========================================
- Coverage   85.01%   11.05%   -73.97%     
===========================================
  Files          35       35               
  Lines        3924     3891       -33     
===========================================
- Hits         3336      430     -2906     
- Misses        588     3461     +2873     

☔ 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

coveralls commented May 16, 2025

Pull Request Test Coverage Report for Build 15077915515

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.102%

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: 0.0%
Covered Lines: 3336
Relevant Lines: 3920

💛 - Coveralls

@penelopeysm penelopeysm changed the title Don't test Mooncake on 1.12 JET + Mooncake fixes for 1.12 May 16, 2025
@penelopeysm penelopeysm force-pushed the py/no-mooncake-pre branch 2 times, most recently from 178599a to 485d372 Compare May 16, 2025 12:45
@penelopeysm penelopeysm force-pushed the py/no-mooncake-pre branch from 485d372 to 64daf52 Compare May 16, 2025 12:46
@penelopeysm penelopeysm force-pushed the py/no-mooncake-pre branch 4 times, most recently from c25fd4c to d6e9c83 Compare May 16, 2025 21:38
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.

2 participants