-
Notifications
You must be signed in to change notification settings - Fork 37
[Merged by Bors] - condition and decondition
#301
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
Closed
Closed
Changes from all commits
Commits
Show all changes
120 commits
Select commit
Hold shift + click to select a range
cd1c46d
added ConditionContext and ContextualModel
torfjelde b877656
Merge branch 'master' into tor/conditioning
torfjelde b1106ee
removed redundant definition
torfjelde 0f00771
return condition model by default
torfjelde c754291
formatting
torfjelde 2d3f94c
forgot to include contextual model in previous commit
torfjelde 3e5a79f
fixed typos
torfjelde d4e4238
added some niceties to ConditionContext
torfjelde 85a47eb
added support for vectors of VarName
torfjelde c7dae8d
Update src/contexts.jl
torfjelde 14f5f57
Merge branch 'master' into tor/conditioning
yebai d3b6485
Merge branch 'master' into tor/conditioning
yebai 75680b3
upper-bound Distributions.jl in tests
torfjelde 1692c03
Merge branch 'master' into tor/conditioning
torfjelde 262c86b
Merge branch 'tor/conditioning' of github.com:TuringLang/DynamicPPL.j…
torfjelde f0ae744
make the isassumption check using context extensible and nicer
torfjelde 22fcae8
Merge branch 'tor/upper-bound-distributions' into tor/conditioning
torfjelde b990bb0
renamed type-parameter for ConditionContext
torfjelde 8994cd7
Update src/contexts.jl
torfjelde 8da41c8
Merge branch 'master' into tor/conditioning
torfjelde 94da453
introduced convenient _getvalue method
torfjelde 4e74cf8
overload tilde_assume rather than tilde_assume! and others for Condit…
torfjelde f9cdfa9
added contextual_isassumption for PrefixContext
torfjelde 835a41e
implemented contextual_isassumption for all contexts
torfjelde 5d110d5
improved the way ConditionContext works signficantly
torfjelde 560ca83
forgot impl of dot_tilde_observe for ConditionContext
torfjelde 5635c3b
Apply suggestions from code review
torfjelde e78dc65
overload _evaluate rather than the model-call directly
torfjelde 5f0e4a8
Merge branch 'tor/conditioning' of github.com:TuringLang/DynamicPPL.j…
torfjelde f9e753a
initial work
torfjelde f090ff5
added some missing implementations
torfjelde 4e36c55
formatting
torfjelde 3a408cf
Merge branch 'tor/context-traits' into tor/conditioning-with-traits
torfjelde 1d3b11e
drop now unneceesary impls for tilds for ConditionContext
torfjelde e1a7d38
formatting
torfjelde b42c34f
address issues using traits
torfjelde c7c60e6
added rewrap for contexts
torfjelde be67807
do decondition properly
torfjelde 0468297
added some examples and decondition now removes ConditionContext
torfjelde 80e3d5f
improved condition and decondition a bit further
torfjelde 9419e76
use rewrap in _evaluate for ContextualModel
torfjelde 4e566f7
remove the drop_missing as it is no longer needed
torfjelde d035c23
Merge branch 'tor/conditioning' into tor/conditioning-with-traits
torfjelde 5c1f18e
Merge branch 'master' into tor/conditioning
torfjelde d6cd4ff
Merge branch 'tor/conditioning' into tor/conditioning-with-traits
torfjelde b27228a
rename rewrap to setchildcontet
torfjelde 4935d5c
formatting
torfjelde 6196083
made show a bit nicer for ConditionContext
torfjelde 65048fc
use print instead of println in show
torfjelde 48dda72
Merge branch 'tor/conditioning' into tor/conditioning-with-traits
torfjelde 649af29
formatting
torfjelde ffdee05
Merge branch 'tor/conditioning' into tor/conditioning-with-traits
torfjelde 4010ab8
make Model a contextual model
torfjelde 5b26300
Merge branch 'master' into tor/conditioning
torfjelde bf39000
Merge branch 'tor/conditioning' into tor/conditioning-with-traits
torfjelde 798798b
Merge branch 'tor/conditioning-with-traits' into tor/conditioning-wit…
torfjelde df5478f
Merge branch 'master' into tor/context-traits
torfjelde ee035cb
added some more functionality for context traits
torfjelde 93184cc
Merge branch 'tor/context-traits' into tor/conditioning-with-traits
torfjelde 21c08e5
dont overload haskey and improved contextual_isassumption check
torfjelde f52ccdd
Merge branch 'tor/conditioning-with-traits' into tor/conditioning-wit…
torfjelde 35fad36
remove the now unnecessary ContextualModel and AbstractModel
torfjelde 9297e61
removed some leftovers
torfjelde 65f8094
removed now gone include
torfjelde b201ef3
removed leftovers
torfjelde 9ebdd0e
formatting
torfjelde 274ad23
fixed typo
torfjelde a02f7b8
Merge branch 'tor/conditioning-with-traits-in-model' of github.com:Tu…
torfjelde b7998bc
fixed PointwiseLikelihood
torfjelde cf9d168
Merge branch 'tor/context-traits' into tor/conditioning-with-traits
torfjelde 589507f
Merge branch 'tor/conditioning-with-traits' into tor/conditioning-wit…
torfjelde 8cc3193
improved condition and fixed isassumption
torfjelde f3698cf
Merge branch 'tor/conditioning-with-traits' into tor/conditioning-wit…
torfjelde 26edb2c
added BangBang as dep
torfjelde eb31a4a
Merge branch 'tor/conditioning-with-traits' into tor/conditioning-wit…
torfjelde be61ef1
fixed the _evaluate
torfjelde 4e3e08f
fixed a doctest
torfjelde 1a40c9c
Merge branch 'tor/context-traits' into tor/conditioning-with-traits
torfjelde bdf3fb4
Merge branch 'tor/conditioning-with-traits' into tor/conditioning-wit…
torfjelde 9e23d4d
formatting
torfjelde ffe896a
Merge branch 'tor/context-traits' into tor/conditioning-with-traits
torfjelde e2f6fc5
formatting
torfjelde 987e4e4
Merge branch 'tor/conditioning-with-traits' into tor/conditioning-wit…
torfjelde a361a5e
formatting
torfjelde ce160d6
fixed condition without arguments
torfjelde 41cc734
Merge branch 'tor/conditioning-with-traits' into tor/conditioning-wit…
torfjelde b492041
had forgotten a return
torfjelde 7ae9e3e
added methods for extracting the conditioned/observed variables and v…
torfjelde 3b31d35
fixed a couple of tilde statements
torfjelde cefb443
added docstring to observations
torfjelde 51209fd
Merge branch 'master' into tor/context-traits
yebai 6086734
Apply suggestions from code review
yebai e579020
Apply suggestions from code review
torfjelde 7c9dc5e
make NodeTrait an abstract type
torfjelde e67089f
make matchingvalue work nicely with contexts
torfjelde 9479ce4
added a bunch of tests for the new trait system for contexts
torfjelde 1315d88
formatting
torfjelde 2af625c
Merge branch 'tor/context-traits' into tor/conditioning-with-traits-i…
torfjelde 1d3fa2b
dont export contextualize, observations and conditioned
torfjelde da34dff
added getvalue_nested and hasvalue_nested to be more explicit
torfjelde 5e15b25
added a substantial amount of testing for ConditionContext
torfjelde 386e985
removed some debugging code
torfjelde 52c9f04
use maybe_view in isassumption check
torfjelde 65e7f71
added more extensive docstring for getvalue_nested and hasvalue_nested
torfjelde 3822da2
Merge branch 'master' into tor/conditioning-with-traits-in-model
torfjelde 0054ffb
some minor style changes
torfjelde 14a94f0
added docs and doctests for condition and decondition for model
torfjelde 6e563cf
rephrased a comment
torfjelde 8011381
improvement to remove_prefix in tests
torfjelde ac5c291
formatting
torfjelde 297bf92
fixing some tests
torfjelde bab9e19
fixed bug in tilde_observe for prefix context
torfjelde 2d1985b
attempted fix for doctests
torfjelde 67dd45a
fixed doctests
torfjelde 2735784
formatting
torfjelde f641c8a
Merge branch 'master' into tor/conditioning-with-traits-in-model
torfjelde ed7aa8b
fixed doctests
torfjelde 333fec7
fixed doctests on 1.3
torfjelde 73736ef
bump of minor version
torfjelde 264e22b
bump version of integration tests
torfjelde File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
Should we do
@nospecialize(context::AbstractContext)? Or does this mean that we also won't specialize ongetvalue(::ConditionContext, ...)?