-
Notifications
You must be signed in to change notification settings - Fork 36
InitContext
, part 5 - Remove SamplingContext
, SampleFrom{Prior,Uniform}
, {tilde_,}assume
#985
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
base: py/actually-use-init
Are you sure you want to change the base?
Conversation
c32d112
to
b7221cc
Compare
InitContext
, part 5 - Remove SamplingContext
, SampleFromPrior
, SampleFromUniform
, and associated codeInitContext
, part 5 - Remove SamplingContext
, SampleFrom{Prior,Uniform}
, {tilde_,}assume
b7221cc
to
3835d01
Compare
d55d378
to
a392451
Compare
3835d01
to
713034f
Compare
a392451
to
12d93e5
Compare
713034f
to
45a97ee
Compare
12d93e5
to
7a8e7e3
Compare
45a97ee
to
e817d9c
Compare
7e38bbe
to
1d8bceb
Compare
92772b5
to
1ffc409
Compare
1d8bceb
to
2edcd10
Compare
1957b06
to
4fc60dc
Compare
Benchmark Report for Commit 8e3dcacComputer Information
Benchmark Results
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## py/actually-use-init #985 +/- ##
========================================================
+ Coverage 80.57% 81.46% +0.89%
========================================================
Files 39 39
Lines 3927 3825 -102
========================================================
- Hits 3164 3116 -48
+ Misses 763 709 -54 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
DynamicPPL.jl documentation for PR #985 is available at: |
3a16f9c
to
4c96020
Compare
3951d1d
to
79a5f3c
Compare
@@ -77,48 +77,6 @@ using DynamicPPL.TestUtils.AD: run_ad, WithExpectedResult, NoTest | |||
end | |||
end | |||
|
|||
@testset "Turing#2151: ReverseDiff compilation & eltype(vi, spl)" begin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find a way to reproduce this test without SamplingContext and the whole tilde-pipeline machinery that this PR removes, so I think that this is no longer relevant.
79a5f3c
to
7aae613
Compare
4c96020
to
7b4c5fa
Compare
7b4c5fa
to
23cafe0
Compare
5278370
to
331279c
Compare
23cafe0
to
8587eb7
Compare
331279c
to
7b0d5a9
Compare
Note that, apart from being simpler code, Distributions.Uniform also doesn't allow the lower and upper bounds to be exactly equal (but we might like to keep that option open in DynamicPPL, e.g. if the user wants to initialise all values to the same value in linked space).
This should have been changed in #940, but slipped through as the file wasn't listed as one of the changed files.
8587eb7
to
a6a42bd
Compare
7b0d5a9
to
0bd4e02
Compare
0bd4e02
to
8e3dcac
Compare
f6dd1d5
to
d9292ad
Compare
726d486
to
bc04355
Compare
Part 1: Adding
hasvalue
andgetvalue
to AbstractPPLPart 2: Removing
hasvalue
andgetvalue
from DynamicPPLPart 3: Introducing
InitContext
andinit!!
Part 4: Using
InitFromParams
to implementpredict
,returned
, andinitialize_values
This is part 5/N of #967.
This PR removes everything that is no longer needed.
SamplingContext
,SampleFromPrior
,SampleFromUniform
, now have direct one-to-one replacements (albeit with slightly different behaviour since they now always overwrite variables in the varinfo).It also removes
assume
andtilde_assume
.Prior to this PR we had two different kinds of
assume
, one with a sampler and one without. Now we only have the one without, so we can just move that definition intotilde_assume!!(::DefaultContext, ...)
.Finally,
tilde_assume
has been subsumed intotilde_assume!!
as we can just dispatch on the type ofright
. (Previously this wasn't possible because there was a lot of stuff aboutis_rhs_model
, etc. etc. which was removed in #960.)Closes #859
Closes #955