InitContext
, part 5 - Remove SamplingContext
, SampleFrom{Prior,Uniform}
, {tilde_,}assume
#985
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part 1: Adding
hasvalue
andgetvalue
to AbstractPPLPart 2: Removing
hasvalue
andgetvalue
from DynamicPPLPart 3: Introducing
InitContext
andinit!!
Part 4: Using
ParamsInit
to implementpredict
,returned
, andinitialize_values
This is part 5/N of #967.
Warning
This PR modifies
DebugUtils
, so there will almost certainly be conflicts with #976.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 removed 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