Skip to content

Conversation

penelopeysm
Copy link
Member

@penelopeysm penelopeysm commented Jun 26, 2025

Turing.Inference.getparams(model, vi) is really slow on untyped vi because it has to re-evaluate the model. It's much faster to convert to a typed vi before re-evaluating.

(In the medium-term future, once accumulators are in, we shouldn't need to rerun the model at all, but this at least makes prior sampling usable while we get that in.)

Closes #2604

Copy link
Contributor

Turing.jl documentation for PR #2605 is available at:
https://TuringLang.github.io/Turing.jl/previews/PR2605/

Copy link

codecov bot commented Jun 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.59%. Comparing base (97c3bc7) to head (5d1f1e0).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2605      +/-   ##
==========================================
+ Coverage   85.57%   85.59%   +0.01%     
==========================================
  Files          22       22              
  Lines        1456     1458       +2     
==========================================
+ Hits         1246     1248       +2     
  Misses        210      210              

☔ 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

@sunxd3 sunxd3 left a comment

Choose a reason for hiding this comment

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

fun!

@coveralls
Copy link

Pull Request Test Coverage Report for Build 15907755992

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 85.655%

Totals Coverage Status
Change from base Build 15901810849: 0.02%
Covered Lines: 1248
Relevant Lines: 1457

💛 - Coveralls

@penelopeysm penelopeysm merged commit 7638c01 into main Jun 26, 2025
34 checks passed
@penelopeysm penelopeysm deleted the py/fix-getparams-untyped-vi branch June 26, 2025 17:44
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.

Prior() sampling takes longer than NUTS()
3 participants