push people towards init!! with explicit accs/init strategy/transform strategy#1264
push people towards init!! with explicit accs/init strategy/transform strategy#1264penelopeysm merged 4 commits intobreakingfrom
init!! with explicit accs/init strategy/transform strategy#1264Conversation
|
It might seem like I'm jumping the gun a bit with this and that v0.40 already has enough breaking changes. (The changelog is disgustingly complex) The way I see it, though, I think that we've already done too many things to not commit to this. I think it's important that even though we might not yet be able to get rid of VarInfo*, we have a clear vision of what's going to happen going forward. It's one thing to say that there are 40 breaking changes and there might be 40 more to come; but if you say there are 40 breaking changes AND if you write your code this way you can avoid the worst of the 40 more breaking changes that have not yet landed, then that's just more friendly. * This mostly depends on Turing & Gibbs. Although, I will note I was quite pleased that there are only five calls to |
Benchmark Report
Computer InformationBenchmark Results |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## breaking #1264 +/- ##
============================================
- Coverage 78.78% 78.70% -0.09%
============================================
Files 46 46
Lines 3564 3555 -9
============================================
- Hits 2808 2798 -10
- Misses 756 757 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
DynamicPPL.jl documentation for PR #1264 is available at: |
see #1184
this PR is basically me trying to get people to stop using
evaluate!!(model, vi)which is pretty hard to reason about. it depends on a lot of things:vimodel.contextif it's an InitContext and otherwise it's inferred fromvi,model.contextif it's an InitContext and otherwise it's inferred fromvi(yeah, that's quite nasty)
instead of this the intention is to push people towards using
init!!([rng,] model, ::OnlyAccsVarInfo, init_strategy, transform_strategy)because the end goal for DPPL (at least, my end goal) is to have a single evaluation method, whose name is not yet determined, but should take exactly those five arguments (perhaps in a different order).
i'll write docs on this soon.
unfortunately we still need to keep the old two-argument
evaluate!!method around in DynamicPPL because things likeinit!!are defined in terms of it. it is possible to switch it round and make this depend oninit!!, but that's a bit harder to do since that relies on getting rid of DefaultContext.