-
Notifications
You must be signed in to change notification settings - Fork 32
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
Reopening of previous PR #309
Merged
Merged
Changes from 250 commits
Commits
Show all changes
262 commits
Select commit
Hold shift + click to select a range
a0c05f3
fixed some signatures for Model
torfjelde 307cd7e
fixed a method call
torfjelde 5972771
fixed method signatures
torfjelde c4ecd0e
sort of fixed the matchingvalue functionality for model
torfjelde a34b51c
formatting
torfjelde b89ff7e
removed redundant _tilde method
torfjelde 6368282
Merge branch 'tor/tilde-simplification' into tor/sampler-context
torfjelde e4a2cf8
removed left-over acclogp! that should not be here anymore
torfjelde 7605785
export SamplingContext
torfjelde 354ac52
use context instead of ctx to refer to contexts
torfjelde b7a2b3b
formatting
torfjelde 9e0fc9a
use context instead of ctx for variables
torfjelde 7a4a1a3
use context instead of ctx to refer to contexts
torfjelde 7899473
Update src/compiler.jl
torfjelde 1630476
Update src/context_implementations.jl
torfjelde 6892d2b
Apply suggestions from code review
torfjelde 13da1b4
added some whitespace to some docstrings
torfjelde d76e5b3
deprecated tilde and dot_tilde plus exported new versions
torfjelde 8059669
formatting
torfjelde 4343896
Merge branch 'master' into tor/tilde-simplification
yebai 43ef8d1
minor version bump
torfjelde fec00b6
Merge branch 'master' into tor/sampler-context
torfjelde ffb4933
Merge branch 'master' into tor/sampler-context
torfjelde 43356a2
Merge branch 'master' into tor/tilde-simplification
torfjelde 671e0b7
Merge branch 'master' into tor/tilde-simplification
torfjelde 30c8345
Merge branch 'tor/tilde-simplification' into tor/sampling-context-simple
torfjelde 1015f0e
added impl of matchingvalue for contexts
torfjelde 23c86a7
reverted the change that makes assume always resample
torfjelde 17f5abe
removed the inds arguments from assume and dot_assume to stay non-bre…
torfjelde dbd61f0
Update src/context_implementations.jl
yebai b10ba3f
added missing sampler arg to tilde_observe
torfjelde 43779e8
Merge branch 'tor/sampling-context-simple' of github.com:TuringLang/D…
torfjelde bc5029f
added missing sampler argument in dot_tilde_observe
torfjelde 7eac33d
fixed order of arguments in some dot_assume calls
torfjelde 8599481
formatting
torfjelde 90a8c45
formatting
torfjelde f9d4ff8
added missing sampler argument in tilde_observe for SamplingContext
torfjelde e424fe7
added missing word in a docstring
torfjelde 70957d2
updated submodel macro
torfjelde d00cdcf
removed unwrap_childcontext and related since its not needed for this PR
torfjelde 639fd6e
updated submodel macro
torfjelde c9a06fb
fixed evaluation implementations of dot_assume
torfjelde 2fe5f40
updated pointwise_loglikelihoods and related
torfjelde b532ca6
added proper tests for pointwise_loglikelihoods
torfjelde 4e2274e
updated DPPL tests to reflect recent changes
torfjelde ef6da43
bump minor version since this will be breaking
torfjelde dbb48c5
Merge branch 'tor/tilde-simplification' into tor/sampling-context-simple
torfjelde 10899f3
formatting
torfjelde 1f21ce4
formatting
torfjelde 7004506
renamed mean_of_mean_models used in tests
torfjelde fa6c4d6
bumped dppl version in integration tests
torfjelde 684d829
Apply suggestions from code review
torfjelde 07bb284
Apply suggestions from code review
torfjelde c7c6a3c
fixed ambiguity error
torfjelde c259999
Merge branch 'tor/sampling-context-simple' of github.com:TuringLang/D…
torfjelde 06d319c
Introduction of `SamplingContext`: keeping it simple (#259)
torfjelde cb996c6
Update src/DynamicPPL.jl
torfjelde 300f4b6
Merge branch 'master' into tor/tilde-simplification
torfjelde 0437d39
Merge branch 'tor/tilde-simplification' into tor/simple-varinfo-v2
torfjelde 03c9285
added initial impl of SimpleVarInfo
torfjelde f91952d
remove unnecessary debug statements to be compat with Zygote
torfjelde 4d4b489
make reconstruct slightly more generic
torfjelde 1506773
Merge branch 'master' into tor/simple-varinfo-v2
torfjelde a68c045
added a couple of convenience constructors
torfjelde 9766aec
formatting
torfjelde 46b1c78
small fix
torfjelde 3a645d6
return var_info from tilde-statements, allowing impl of immutable ver…
torfjelde a2ec0bd
allow usage of non-Ref types in SimpleVarInfo
torfjelde 1d9bc37
update submodel-macro
torfjelde cfd7f21
formatting and docstring for submodel-macro
torfjelde c200e73
attempt at supporting implicit returns too
torfjelde efeb812
added a small comment
torfjelde 14b9495
simplifed submodel macro a bit
torfjelde c3d9e7b
formatting
torfjelde 416e773
fixed typo
torfjelde ac2b68d
Merge branch 'tor/simple-varinfo-v2' of github.com:TuringLang/Dynamic…
torfjelde b4b8b03
use bang-bang convention
torfjelde a725a27
updated PointwiseLikelihoodContext
torfjelde 5512670
fixed issue where we unnecessarily replace the return-statement
torfjelde 4c1ee70
check subtype in the retval
torfjelde 26590b5
formatting
torfjelde 42fd414
fixed type-instability in retval check
torfjelde f219545
introduced evaluate method for model
torfjelde ce13566
remove unnecessary type-requirement
torfjelde 3556b11
make return-value check much nicer
torfjelde 599d094
removed redundant creation of anonymous function
torfjelde 22b170c
dont use UnionAll in return_values
torfjelde 4606f16
updated tests for submodel to reflect new syntax
torfjelde 68cb021
moved to using BangBang-convention for most methods
torfjelde cb1fd8b
remove SimpleVarInfo from this branch
torfjelde 5936dd0
added a comment
torfjelde 426c465
reverted submodel macro to use = rather than ~
torfjelde 208b62c
Merge branch 'tor/immutable-varinfo-support' into tor/simple-varinfo-v2
torfjelde a8e55bd
updated SimpleVarInfo impl
torfjelde 149229f
added a couple of missing deprecations
torfjelde 809d23f
updated tests
torfjelde 8ea80d7
Merge branch 'tor/immutable-varinfo-support' into tor/simple-varinfo-v2
torfjelde 07f684b
updated implementations of logjoint and others
torfjelde d317bd8
Merge branch 'tor/immutable-varinfo-support' into tor/simple-varinfo-v2
torfjelde b00ae47
formatting
torfjelde a88f8ea
Merge branch 'tor/immutable-varinfo-support' into tor/simple-varinfo-v2
torfjelde bfd7c78
added eltype impl for SimpleVarInfo
torfjelde acb15eb
formatting
torfjelde 4828aab
fixed eltype for SimpleVarInfo
torfjelde 167976f
implement setindex!! in prep for allowing sampling with immutable vi
torfjelde b56024e
Merge branch 'tor/immutable-varinfo-support' into tor/simple-varinfo-v2
torfjelde e4f0ad2
formatting
torfjelde ccfd112
initial work on allowing sampling using SimpleVarInfo
torfjelde d660433
formatting
torfjelde c925b07
Merge branch 'master' into tor/simple-varinfo-v2
torfjelde 3ec72c6
Merge branch 'tor/simple-varinfo-v2' of github.com:TuringLang/Dynamic…
torfjelde 90cf754
add constructor for SimpleVarInfo using model
torfjelde 0ab9d8b
improved leftover to_namedtuple_expr, fixing a bug when used with Zygote
torfjelde 42ad552
bumped patch version
torfjelde 975184d
Merge branch 'tor/allargs-construction-improvement' into tor/simple-v…
torfjelde a0cd0c4
Merge branch 'master' into tor/simple-varinfo-v2
torfjelde aa706ef
Merge branch 'master' into tor/immutable-varinfo-support
torfjelde 744a032
Merge branch 'tor/immutable-varinfo-support' into tor/simple-varinfo-v2
torfjelde 0f1def9
fixed set_flag!!
torfjelde 54a1be7
Merge branch 'master' into tor/immutable-varinfo-support
torfjelde 76daca6
Merge branch 'tor/immutable-varinfo-support' into tor/simple-varinfo-v2
torfjelde 596d63b
Merge branch 'master' into tor/immutable-varinfo-support
torfjelde 6f947f7
Merge branch 'tor/immutable-varinfo-support' into tor/simple-varinfo-v2
torfjelde 53596fb
forgot the return in the replace_returns
torfjelde 4076f63
Merge branch 'tor/immutable-varinfo-support' into tor/simple-varinfo-v2
torfjelde 45b3a76
Merge branch 'master' into tor/immutable-varinfo-support
torfjelde 57b5d47
bigboy update to benchmarks
torfjelde d0a08f6
fixed some issues and added support for usage of Dict in SimpleVarInfo
torfjelde 0ab59eb
Merge branch 'master' into tor/immutable-varinfo-support
torfjelde 4002318
Merge branch 'tor/immutable-varinfo-support' into tor/simple-varinfo-v2
torfjelde ff75ddc
added docstring and improved indexing behvaior for SimpleVarInfo
torfjelde d29dd8f
formatting
torfjelde a72594f
dont allow sampling with indexing when using SimpleVarInfo with Named…
torfjelde be35be0
_setval_kernel and others are only supported by VarInfo atm
torfjelde c3da562
Merge branch 'master' into tor/immutable-varinfo-support
torfjelde 3f3d8d3
Merge branch 'tor/immutable-varinfo-support' into tor/simple-varinfo-v2
torfjelde 4d4eeb3
fixed typo in comment
torfjelde b7862a8
added more values_as impls
torfjelde 39619cd
removed redundant values_from_metadata
torfjelde 294cd0f
Merge branch 'master' into tor/immutable-varinfo-support
torfjelde bcb1e46
Merge branch 'tor/immutable-varinfo-support' into tor/simple-varinfo-v2
torfjelde e67901b
fixed bug in push!! for SimpleVarInfo
torfjelde e7c0a76
Merge branch 'master' into tor/benchmark-update
torfjelde 7309fb7
fixed a couple of bugs in SimpleVarInfo
torfjelde d7dad31
forgot which branch Im on
torfjelde 6ec2d29
added handling of short defs in replace_returns and more docstrings
torfjelde dfd9dc5
fixed bug in generate_tilde introduced in a merge
torfjelde 18ed817
fixed a bug in isfuncdef
torfjelde b61a9be
fixed tests
torfjelde 8d2dc71
formatting
torfjelde 9cff93f
uncomment mistakenly commented code
torfjelde 6c3bd62
Merge branch 'master' into tor/simple-varinfo-v2
torfjelde af6427a
bumped version
torfjelde 81d6369
Merge branch 'master' into tor/simple-varinfo-v2
torfjelde 7b5dbce
updated doctests
torfjelde a6e2ffb
dont carry over bang-bang versions that we dont need for general vari…
torfjelde 49c1157
Apply suggestions from @phipsgabler
torfjelde f601d5d
updated tests
torfjelde 4e36c09
Merge branch 'master' into tor/simple-varinfo-v2
torfjelde 72d2f53
removed unnecessary BangBang methods
torfjelde df212b7
fixed zygote rule for dot_observe
torfjelde 74bfd4e
fixed Setfield.jl + returning VarInfo bug in model-macro
torfjelde b759535
updated tests
torfjelde 9d421a5
Merge branch 'master' into tor/simple-varinfo-v2
torfjelde a61eef2
fixed docs
torfjelde 8bc72ff
formatting
torfjelde cfb1a2c
Merge branch 'master' into tor/simple-varinfo-v2
torfjelde cdd88d0
fixed issues when using ThreadSafeVarInfo
torfjelde 3faa883
fixed _pointwise_observe for ThreadSafeVarInfo
torfjelde e14930e
updated ThreadSafeVarInfo
torfjelde fc93782
made SimpleVarInfo compat with ThreadSafeVarInfo and added show
torfjelde b6939f6
added some tests for return-values of models
torfjelde 8903523
formatting
torfjelde d90a6cd
fixed doctest for SimpleVarInfo
torfjelde 082b2ef
formatting
torfjelde 9ad362d
removed comparison of show from doctest for SimpleVarInfo
torfjelde 4a39846
Merge branch 'master' into tor/simple-varinfo-v2
torfjelde 7109596
Update src/compiler.jl
torfjelde d5345d9
Apply suggestions from code review
torfjelde 42bf1c5
removed OrderedCollections from docs
torfjelde e14506f
some additional fixes
torfjelde 715ef89
fixed method ambiguity and some ill-defined map
torfjelde 2991db2
renamed evaluate to evaluate!!
torfjelde 2fbbd5e
added implementations of haskey, getindex and setindex!! for SimpleVa…
torfjelde 016f485
formatting
torfjelde 7a8d9a1
dropped redundant definition
torfjelde b76b1d1
use getproperty instead of getindex
torfjelde bbdabd1
fixed method-ambiguity and added some comments
torfjelde 5a3ada5
fixed docstring of SimpleVarInfo
torfjelde ee6c111
fixed docstrings
torfjelde 7fa379d
fixed Project.toml for docs
torfjelde 0ea28b7
fixed docstring of canview
torfjelde 59d61f6
fixed docstrings
torfjelde ab06c9c
another attempt at fixing docstrings
torfjelde b5e6876
added a TODO comment
torfjelde a36c085
remove some output from docstring of SimpleVarInfo
torfjelde 74a9781
fixed haskey and hasvalue for AbstractDict
torfjelde dc28ceb
updated some comments
torfjelde 4c12498
updated some errors
torfjelde 37a1e2e
added sampling dot_assume for SimpleVarInfo
torfjelde 41c2d80
added true versions of density computations to TestUtils
torfjelde 35445ba
added tests specific for SimpleVarInfo
torfjelde acdedc7
also document TestUtils
torfjelde 95f67c0
added TestUtils to docs
torfjelde 8b5729c
fixed setindex!! for SimpleVarInfo using AbstractDict
torfjelde 04dab05
added more tests
torfjelde 251eb80
formatting
torfjelde 142d93b
dont use BangBang for setall!
torfjelde 3c91d2f
revert unnecessary changes to settrans!
torfjelde 1ffb83c
revert unnecessary changes to set_flag!
torfjelde 871b8cd
revert some changes to docstrings
torfjelde df4e514
fixed some comments and docstrings
torfjelde 037a8c9
added more convenient logjoint, logprior, and loglikelihood methods
torfjelde 7a9af3c
removed unnecessary export
torfjelde 71bd8bc
fixed export
torfjelde 969bb65
use the Setfield impl of getindex, etc. as default and specialize on …
torfjelde 92dd5b8
fixed docstrings of logjoint, etc.
torfjelde de936a5
Apply suggestions from code review
torfjelde 147e9f5
fixed docstring for model
torfjelde aeb4fa1
replaced return_values by capturing return-value from tilde-statement…
torfjelde abb07b3
added some tests for return-value of model
torfjelde 25cacd3
added broadcast_foreach
torfjelde 87ce03b
Apply suggestions from @devmotion
torfjelde 46a5019
Merge branch 'tor/simple-varinfo-v2' of github.com:TuringLang/Dynamic…
torfjelde 4bdeca3
remove broadcast_foreach for now
torfjelde 80ee8f4
some fixes to ThreadSafeVarInfo
torfjelde 496ec3d
Apply suggestions from code review
torfjelde 9c33e67
fixed docstrings
torfjelde 6ad0e43
forgot qualification for set
torfjelde 0d217c4
formatting
torfjelde 57dda81
added comment about why we cant use MacroTools.isdef
torfjelde c4c6412
remove unnecessary deprecation
torfjelde 791c181
udpated some docstrings
torfjelde 49165b6
fixed more docstrings
torfjelde 987d7ea
make overloads of BangBang methods qualified
torfjelde d514b99
remove overloading of values and instead use values_as without the ty…
torfjelde 0eb27b6
Apply suggestions from code review
torfjelde 0bab3e6
renamed hasvalue for SimpleVarInfo to _haskey
torfjelde fa3f430
revert changes from previous commit
torfjelde b9a987a
minor version bump
torfjelde 56a5106
fixed sampling with ThreadSafeVarInfo
torfjelde e00498a
fixed setindex!! for ThreadSafeVarInfo
torfjelde 64945e6
fixed eltype for ThreadSafeVarInfo wrapping a SimpleVarInfo
torfjelde 640551b
fixed a test
torfjelde 00dfdbd
relax atol in serialization tests a bit
torfjelde db1b033
temporarily disable Julia 1.3
torfjelde 6a63e15
relax atol for a prior check
torfjelde d65fc74
Improvements to `@submodel` in #309 (#348)
torfjelde a8c368c
fixed a test case using submodel
torfjelde 64819a1
improved docstring according to comments by @devmotion
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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
[deps] | ||
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46" | ||
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" | ||
|
||
[compat] | ||
Distributions = "0.25" | ||
Documenter = "0.27" | ||
Setfield = "0.7.1, 0.8" | ||
StableRNGs = "1" |
This file contains 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# DynamicPPL.TestUtils | ||
|
||
```@autodocs | ||
Modules = [DynamicPPL.TestUtils] | ||
``` |
This file contains 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 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 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.
I don't think this is what we want to do, but as mentioned in the comments the tests are currently failing on 1.3 because of FFTW.jl failing to build or something.
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.
FFTW should work just fine with Julia 1.3, this seems strange.
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.
Maybe the artifacts are cached incorrectly?
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.
Possibly. I'm not an expert on GH actions though, so I have no current intuition of how to fix this (other than to start googling).