Skip to content
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

[Merged by Bors] - Linearization/flattening of SimpleVarInfo #417

Closed
wants to merge 245 commits into from
Closed
Show file tree
Hide file tree
Changes from 244 commits
Commits
Show all changes
245 commits
Select commit Hold shift + click to select a range
14594d6
performing linking in assume rather than implicitly in getindex
torfjelde Jan 7, 2022
0bc279f
added istrans to SimpleVarInfo
torfjelde Jan 7, 2022
81ee12e
Apply suggestions from code review
torfjelde Jan 7, 2022
d39f87d
added a comment
torfjelde Jan 7, 2022
23f34cc
bump patch version
torfjelde Jan 7, 2022
d3ec108
introduced settrans!!
torfjelde Jan 9, 2022
81782c9
added istrans(vi) and renamed all occurences of trans! to trans!!
torfjelde Jan 9, 2022
12bfb42
exclusively use settrans!! to set the istrans for SimpleVarInfo
torfjelde Jan 10, 2022
c2c2417
removed usage of deprecated method in turing tests
torfjelde Jan 10, 2022
2e2cb5c
added docstring to settrans!!
torfjelde Jan 13, 2022
f6c3fc4
include istrans flag in type of SimpleVarInfo instead
torfjelde Jan 27, 2022
d643a78
deprecated settrans! in favour of settrans!!
torfjelde Jan 27, 2022
3cab7d9
added some tests specifically for istrans
torfjelde Jan 27, 2022
8b870dc
formatting
torfjelde Jan 27, 2022
0b304db
fixed bugs for ThreadSafeVarInfo
torfjelde Jan 27, 2022
b146b11
additional constructor for SimpleVarInfo
torfjelde Jan 27, 2022
d170d92
Update src/DynamicPPL.jl
torfjelde Feb 9, 2022
f46183b
added ConstructionBase.jl as dep
torfjelde Feb 9, 2022
7a78eec
added constraint types and doctests
torfjelde Feb 9, 2022
70b3b70
added DocStringExtensions as a dep
torfjelde Feb 9, 2022
a03e8cf
formatting
torfjelde Feb 9, 2022
793c931
remove redundant maybe_link
torfjelde Feb 9, 2022
a9b12fd
fixed typo
torfjelde Feb 9, 2022
b1d7f9a
Merge branch 'master' into tor/link-improvements
yebai Feb 9, 2022
be98961
moved a docstring
torfjelde Feb 11, 2022
3e1588b
fixed bug in tets
torfjelde Feb 11, 2022
7697fce
Merge branch 'tor/link-improvements' of github.com:TuringLang/Dynamic…
torfjelde Feb 11, 2022
3139c62
version bump
torfjelde Feb 11, 2022
3610658
added missing istrans impl
torfjelde Feb 12, 2022
27171ad
fixed bug with istrans
torfjelde Feb 13, 2022
cd2d9d6
fixed issue with getindex_raw for VarInfo
torfjelde Feb 13, 2022
d948cb9
Update src/varinfo.jl
torfjelde Feb 13, 2022
6a3e18f
Merge branch 'master' into tor/link-improvements
torfjelde Jun 10, 2022
d674478
Merge branch 'master' into tor/link-improvements
torfjelde Jun 17, 2022
26d2dbb
getindex of varinfo implementations now optionally takes a Distributi…
torfjelde Jun 22, 2022
3fcba56
use get_index_raw with dist argument
torfjelde Jun 22, 2022
83a9448
added missing assume implementations for SimpleVarInfo
torfjelde Jun 22, 2022
356fa9c
fixed settrans!! for VarInfo
torfjelde Jun 22, 2022
13f037f
formatting
torfjelde Jun 24, 2022
c7544e0
fixed bug where constrained/unconstrained wasn't preserved in setinde…
torfjelde Jun 24, 2022
d1dccf1
hack to avoid type-instabilities for dot_assume with MultivariateDist…
torfjelde Jun 24, 2022
ff7ff4a
style
torfjelde Jun 26, 2022
2f1a2ff
added keys implementations for the models in TestUtils to make testin…
torfjelde Jun 26, 2022
d6311b7
added additional test model which uses dot-assume on MultivariateDist…
torfjelde Jun 26, 2022
ed2fa69
updated tests for SimpleVarInfo
torfjelde Jun 26, 2022
a82be56
added a no-op reconstruct for UnivariateDistribution
torfjelde Jun 26, 2022
7aacee5
fixed tests for loglikelihoods
torfjelde Jun 27, 2022
96f128f
fixed dot_tilde_assume for LikelihoodContext
torfjelde Jun 27, 2022
2e88d08
removed some now redundant explicit calls to maybe_invlink
torfjelde Jun 27, 2022
0f9765b
added impls of size and length for the wrapper distributions so they …
torfjelde Jun 27, 2022
116c95c
bumped version
torfjelde Jun 28, 2022
d797e99
removed redunant explict call to maybe_invlink
torfjelde Jun 28, 2022
44b2f66
added test model with array on RHS of a .~ statement
torfjelde Jun 29, 2022
81cd881
improved some of the default implementations of dot_assume
torfjelde Jun 29, 2022
2e14abd
removed unnecessary code in tests
torfjelde Jun 29, 2022
12adc83
improved linking usage in assumes for SimpleVarInfo
torfjelde Jun 29, 2022
af3e6ba
Merge branch 'master' into tor/link-improvements
yebai Jun 29, 2022
f7501df
added model for testing dynamic constraints
torfjelde Jun 30, 2022
abcabf4
added logjoint_true_with_logabsdet_jacobian to TestUtils
torfjelde Jun 30, 2022
fdee509
added test for dynamic constraints for SimpleVarInfo
torfjelde Jun 30, 2022
e974c83
fixed keys implementation of SimpleVarInfo
torfjelde Jun 30, 2022
6c6d5f5
reverted unintended change
torfjelde Jun 30, 2022
5d5bc88
added example_values and posterior_mean_values methods to models in T…
torfjelde Jun 30, 2022
0498336
demo models in TestUtils are now a bit more complex, including constr…
torfjelde Jun 30, 2022
f86f264
added logprior_true_with_logabsdet_jacobian for demo models
torfjelde Jul 1, 2022
0d31137
fixed mistakes in a couple of models in TestUtils
torfjelde Jul 1, 2022
c52630b
moved varnames method which creates iterator of leaf varnames into Te…
torfjelde Jul 1, 2022
fff060c
updated docstring for test_sampler_demo_models
torfjelde Jul 1, 2022
e21958c
renamed varnames to varname_leaves and renamed keys(model) to varname…
torfjelde Jul 1, 2022
9669345
added test_sampler_on_models as a generalization of test_sampler_demo…
torfjelde Jul 1, 2022
7e02735
updated docs
torfjelde Jul 1, 2022
a412029
added docs for TestUtils.DEMO_MODELS
torfjelde Jul 1, 2022
f3818c3
updated some tests
torfjelde Jul 1, 2022
8b799a4
fixed docstrings
torfjelde Jul 1, 2022
93cb298
fixed docstrings
torfjelde Jul 1, 2022
ba5852b
imprvoed docstring
torfjelde Jul 1, 2022
328f713
improved docstrings
torfjelde Jul 1, 2022
801bd4c
renamed Base.keys(model) to varnames(model) in TestUtils
torfjelde Jul 1, 2022
46f6f4c
added default implementation and docstring for TestUtils.varnames
torfjelde Jul 1, 2022
bcb767b
replace handwritten by DocStringExtensions
torfjelde Jul 1, 2022
c5be1c2
Apply suggestions from @devmotion
torfjelde Jul 1, 2022
f266929
Update src/context_implementations.jl
torfjelde Jul 1, 2022
c2dbbaf
removed some asserts and use broadcast instead of map
torfjelde Jul 1, 2022
1abb46c
replace map with broadcasting to ensure consistent behavior
torfjelde Jul 1, 2022
1086c6c
Update src/simple_varinfo.jl
torfjelde Jul 1, 2022
f2fb4a5
added a method nodist to allow broadcasting NoDist constructor
torfjelde Jul 1, 2022
490d24e
updated some tests
torfjelde Jul 1, 2022
6350ccd
renamed AbstractConstraint to AbstractTransformation and its subtypes
torfjelde Jul 1, 2022
951e4c3
updated tests
torfjelde Jul 1, 2022
dcd92c9
fixed nodist usage
torfjelde Jul 1, 2022
2922ffa
fixed implementation of nodist
torfjelde Jul 1, 2022
5266a4b
fixed typo
torfjelde Jul 1, 2022
3c38710
formatting
torfjelde Jul 1, 2022
ba92f3f
bump patch version
torfjelde Jul 1, 2022
70c864c
fixed ThreadsafeVarInfo
torfjelde Jul 1, 2022
8b6b440
Merge branch 'tor/link-improvements' into tor/test-utils-improvements
torfjelde Jul 1, 2022
5843699
fixed tests of pointwise_loglikelihoods
torfjelde Jul 1, 2022
66f41a9
Apply suggestions from code review
torfjelde Jul 1, 2022
eb2d6b5
allow type-stable settrans!! for SimpleVarInfo
torfjelde Jul 1, 2022
e8cdb91
use maybe_invlink in getindex for VarInfo
torfjelde Jul 1, 2022
359d384
added comment to warn about buggy behavior
torfjelde Jul 1, 2022
0b20f09
Merge branch 'tor/link-improvements' into tor/test-utils-improvements
torfjelde Jul 1, 2022
ab0a99b
Update src/context_implementations.jl
torfjelde Jul 1, 2022
dd10913
just fix potential bug in getindex for VarInfo
torfjelde Jul 1, 2022
18d28cc
revert previous change because it likely introduces bugs
torfjelde Jul 1, 2022
32b7aab
elaborate in comment regarding potential bug
torfjelde Jul 1, 2022
fb86231
Merge branch 'tor/link-improvements' of github.com:TuringLang/Dynamic…
torfjelde Jul 1, 2022
f782fe2
added error message to dot_assume
torfjelde Jul 1, 2022
7d3493d
added error message to dot_assume again
torfjelde Jul 1, 2022
2b1893c
Merge branch 'tor/link-improvements' into tor/test-utils-improvements
torfjelde Jul 1, 2022
912d7f8
Apply suggestions from code review
torfjelde Jul 2, 2022
a276e4a
renamed posterior_mean_values to posterior_mean
torfjelde Jul 2, 2022
626eea2
made demo models a bit more complex, now including different observat…
torfjelde Jul 2, 2022
1558924
Update docs/src/api.md
torfjelde Jul 2, 2022
a62c881
reduce number of method definitions by defining some useful type unio…
torfjelde Jul 2, 2022
5cc195a
removed unnecessary method
torfjelde Jul 2, 2022
ea5a7a4
Merge branch 'tor/test-utils-improvements' of github.com:TuringLang/D…
torfjelde Jul 2, 2022
702f2ff
fixed a couple of loglikelihood_true definitions
torfjelde Jul 2, 2022
d8f4970
style
torfjelde Jul 2, 2022
56f30bc
added tests for logprior and loglikelihood computation for SimpleVarInfo
torfjelde Jul 2, 2022
2eaef02
fixed implementation of logpdf_with_trans for NoDist
torfjelde Jul 2, 2022
f0f981b
added _protect_dists method to help with broadcasting of NoDist
torfjelde Jul 2, 2022
8063d1e
Merge branch 'tor/link-improvements' into tor/test-utils-improvements
torfjelde Jul 2, 2022
1e0b946
simplified show for SimpleVarInfo
torfjelde Jul 2, 2022
faa0e42
styling
torfjelde Jul 2, 2022
2935bde
Merge branch 'tor/link-improvements' into tor/test-utils-improvements
torfjelde Jul 2, 2022
78f22e1
removed unused variable
torfjelde Jul 3, 2022
025a4d4
added test for transformed values for the logprior_true and loglikeli…
torfjelde Jul 3, 2022
9e7f493
fixed bug in show for SimpleVarInfo
torfjelde Jul 3, 2022
a72e9b8
Merge branch 'tor/link-improvements' into tor/test-utils-improvements
torfjelde Jul 3, 2022
0a9383b
Revert "added _protect_dists method to help with broadcasting of NoDist"
torfjelde Jul 3, 2022
c057080
Merge branch 'tor/link-improvements' into tor/test-utils-improvements
torfjelde Jul 3, 2022
f5c60ae
renamed test_sampler_on_models to test_sampler
torfjelde Jul 3, 2022
d8b0a75
fixed getindex with vector of varnames for AbstractVarInfo
torfjelde Jul 3, 2022
7149c02
Merge branch 'tor/link-improvements' into tor/test-utils-improvements
torfjelde Jul 3, 2022
25f05de
updated docs
torfjelde Jul 3, 2022
e05fa29
share implementation of example_values
torfjelde Jul 3, 2022
431664d
Apply suggestions from code review
torfjelde Jul 4, 2022
363ebae
added unflatten and values_as for Vector
torfjelde Jul 6, 2022
66424f8
added getindex for AbstractVarInfo with Colon
torfjelde Jul 6, 2022
3bc27f8
added unflatten to VarInfo
torfjelde Jul 7, 2022
ca5b080
added make_default_varinfo allowing specification of how to initialize
torfjelde Jul 7, 2022
cb05fc9
added unflatten also taking sampler for SimpleVarInfo
torfjelde Jul 10, 2022
45445cf
added tonamedtuple impl for SimpleVarInfo
torfjelde Jul 10, 2022
ea8f844
fixed implementation of unflatten for arrays
torfjelde Jul 10, 2022
52274ba
added default impl of unflatten taking sampler
torfjelde Jul 10, 2022
7da0ee9
improved tonamedtuple for SimpleVarInfo with Dict
torfjelde Jul 12, 2022
b3499a3
added marginal_mean_of_samples according to suggestions
torfjelde Jul 12, 2022
2bd5dcd
removed example_values in favour of rand with NamedTuple
torfjelde Jul 13, 2022
61a594c
updated docs
torfjelde Jul 13, 2022
ce5f6e4
Merge branch 'tor/test-utils-improvements' into tor/simple-varinfo-li…
torfjelde Jul 13, 2022
6c941bd
fixed method ambiguity error
torfjelde Jul 18, 2022
5e92e56
added islinked for SimpleVarInfo
torfjelde Jul 18, 2022
aabc45a
formatting
torfjelde Jul 18, 2022
939540c
added link!! and invlink!! as BangBang alternatives to link! and invl…
torfjelde Jul 18, 2022
aecf97f
added specialized implementation for NamedBijector and SimpleVarInfo
torfjelde Jul 18, 2022
9dcefdb
use inverse instead of inv
torfjelde Jul 19, 2022
fd0796b
preserve DefaultTransformation
torfjelde Jul 19, 2022
2ef1f59
Merge branch 'master' into tor/simple-varinfo-linearization
torfjelde Jul 23, 2022
94e5d48
removed duplicated defs
torfjelde Jul 23, 2022
15fdf19
style
torfjelde Jul 23, 2022
48dfb9c
fixed empty!! and added isempty for SimpleVarInfo
torfjelde Jul 23, 2022
70ba82d
added setindex!! for sampler with SimpleVarInfo
torfjelde Jul 23, 2022
d3bff26
made values_as compatible with empty SimpleVarInfo
torfjelde Jul 23, 2022
b14e9cf
added tests for base functionality for SimpleVarInfo too
torfjelde Jul 23, 2022
9f106fa
renamed bijectors.jl to transforming.jl
torfjelde Jul 23, 2022
bf34356
fixed update of logp after initialize_parameters!!
torfjelde Jul 23, 2022
3e5f763
remove now-redundant todo
torfjelde Jul 23, 2022
e649f37
improved the initial step
torfjelde Jul 23, 2022
5941270
fixed bug with initialize_parameters!! introduced in previous commit
torfjelde Jul 23, 2022
f30b875
Update src/sampler.jl
torfjelde Jul 23, 2022
cb3e1f4
add some comments on tonamedtuple
torfjelde Jul 23, 2022
f79fab4
Apply suggestions from code review
torfjelde Jul 24, 2022
58c2550
Update src/transforming.jl
torfjelde Jul 24, 2022
c316e70
renamed make_default_varinfo to default_varinfo
torfjelde Jul 24, 2022
998fcf4
simplified impls of getindex
torfjelde Jul 24, 2022
0913a24
Apply suggestions from code review
torfjelde Jul 24, 2022
9af2638
made impls of default getindex for VarInfo a bit more sensible
torfjelde Jul 24, 2022
482ade7
removed unnecessary namespace specification
torfjelde Jul 24, 2022
b79bf28
use isempty(vi) instead of checking its values
torfjelde Jul 24, 2022
15087c5
fix values_as for certain combinations
torfjelde Jul 24, 2022
88dbdca
added deprecation warnings for link! and invlink!
torfjelde Jul 25, 2022
9b3c40f
add logabsdet-jacobian term in link! and invlink!
torfjelde Jul 27, 2022
57d321c
use context to implement link!! and invlink!!
torfjelde Jul 27, 2022
4409149
added tests for link!! and invlink!!
torfjelde Jul 27, 2022
c34f257
added a note comment
torfjelde Jul 27, 2022
73765e7
renamed DefaultTransformation to LazyTransformation and
torfjelde Jul 27, 2022
0c0c393
added maybe_invlink_before_eval!! allowing invlinking once
torfjelde Jul 27, 2022
5e51755
formatting
torfjelde Jul 27, 2022
3dbc7a9
use OrderedDict instead of Dict for SimpleVarInfo as it preserves the
torfjelde Jul 28, 2022
809de9a
added compat entry for OrderedCollections
torfjelde Jul 29, 2022
656175f
added compat entry for OrderedCollections
torfjelde Jul 29, 2022
a225978
use OrderedDict instead of Dict for SimpleVarInfo as it preserves the
torfjelde Jul 28, 2022
fce67ee
improvements to values_as
torfjelde Jul 30, 2022
b165b35
export values_as
torfjelde Jul 30, 2022
af9c520
added values_as to docs
torfjelde Jul 30, 2022
47c30e3
added proper testing for values_as
torfjelde Jul 30, 2022
40477a4
bump patch version
torfjelde Jul 30, 2022
a972f8e
Apply suggestions from code review
torfjelde Jul 30, 2022
ab2a8b5
use ConstructionBase explicitly
torfjelde Aug 18, 2022
ee7fcd6
use OrderedDict in rand instead of NamedTuple as it supports arbitrar…
torfjelde Aug 18, 2022
a44e712
Merge branch 'tor/minor-varinfo-improvements' into tor/simple-varinfo…
torfjelde Aug 19, 2022
3e869ff
Merge branch 'master' into tor/simple-varinfo-linearization
torfjelde Sep 7, 2022
08de024
Merge branch 'master' into tor/simple-varinfo-linearization
torfjelde Sep 9, 2022
0082505
properly deprecate link! and invlink!
torfjelde Sep 9, 2022
597dfda
added transformation impls for ThreadSafeVarInfo
torfjelde Sep 9, 2022
be7ae6c
added missing impl of values_as for VarInfo and Vector
torfjelde Sep 9, 2022
8dfc7c0
use inverse instead of deprecated inv
torfjelde Sep 9, 2022
e475c87
Update src/transforming.jl
torfjelde Sep 9, 2022
1e6b0a9
renamed nested_haskey and defined common method called getvalue and
torfjelde Sep 9, 2022
ce5757a
Merge branch 'tor/simple-varinfo-linearization' of github.com:TuringL…
torfjelde Sep 9, 2022
e23763b
minor version bump
torfjelde Sep 9, 2022
43b034d
removed unnecessary and confusing constructor
torfjelde Oct 6, 2022
5c7df84
added TODO comment to deprecate
torfjelde Oct 19, 2022
5c7163d
renamed LazyTransformation to DynamicTransformation
torfjelde Oct 24, 2022
5f21dd7
updated docs and docstrings
torfjelde Oct 24, 2022
e044676
Update docs/make.jl
yebai Oct 25, 2022
effec2b
increased tolerance in one of the tests
torfjelde Oct 25, 2022
c7240ab
Merge branch 'tor/simple-varinfo-linearization' of github.com:TuringL…
torfjelde Oct 25, 2022
5fabd07
increase tolerance of tests
torfjelde Oct 25, 2022
2e0fe49
updated docs for varinfos, in particular the shared interface
torfjelde Oct 25, 2022
965fcf5
big refactoring of the varinfo related implementations and docs
torfjelde Oct 27, 2022
200a886
Update src/abstract_varinfo.jl
yebai Oct 27, 2022
5a0296e
Update src/abstract_varinfo.jl
yebai Oct 27, 2022
a2e332e
Update src/varinfo.jl
yebai Oct 27, 2022
d950635
Update varinfo.jl
yebai Oct 29, 2022
e0907c1
fixed bugs with linking
torfjelde Oct 31, 2022
6aceac4
Merge branch 'tor/simple-varinfo-linearization' of github.com:TuringL…
torfjelde Oct 31, 2022
e5d8984
fixed threadsafevarinfo issues
torfjelde Oct 31, 2022
63b3638
added tests for StaticBijector
torfjelde Nov 1, 2022
3ffeef1
added impl of maybe_invlink_before_eval!! for VarInfo
torfjelde Nov 1, 2022
8ed91ec
fixed bug in invlink!! for StaticBijector
torfjelde Nov 1, 2022
8ddfb4c
added maybe_invlink_before_eval!! impl for ThreadSafeVarInfo
torfjelde Nov 1, 2022
3246cf4
fixed bug in doctests
torfjelde Nov 1, 2022
74b5d93
relax constraint on istrans
torfjelde Nov 2, 2022
c6264e5
fixed unflatten for Dict to respect the original type
torfjelde Nov 2, 2022
da04c7b
suggest using OrderedDict instead of Dict in docstrings
torfjelde Nov 2, 2022
41fd89a
fixed doctest
torfjelde Nov 2, 2022
e7b8b10
added docs for unflatten for varinfos
torfjelde Nov 2, 2022
732e94b
Merge branch 'master' into tor/simple-varinfo-linearization
yebai Nov 2, 2022
1c1b6ed
added comment to explain settrans!! for VarInfo
torfjelde Nov 3, 2022
fbf9e0a
renamed MaybeThreadSafeVarInfo
torfjelde Nov 3, 2022
a427983
added comment on maybe_inlink_before_eval!!
torfjelde Nov 3, 2022
6b126b8
removed unnecessary defs in tests
torfjelde Nov 3, 2022
d715b0c
formatting
torfjelde Nov 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "DynamicPPL"
uuid = "366bfd00-2699-11ea-058f-f148b4cae6d8"
version = "0.20.2"
version = "0.21.0"

[deps]
AbstractMCMC = "80f14c24-f653-4e6a-9b94-39d6b0f70001"
Expand Down
4 changes: 3 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ using DynamicPPL
using DynamicPPL: AbstractPPL

# Doctest setup
DocMeta.setdocmeta!(DynamicPPL, :DocTestSetup, :(using DynamicPPL); recursive=true)
DocMeta.setdocmeta!(
DynamicPPL, :DocTestSetup, :(using DynamicPPL, Distributions); recursive=true
)

makedocs(;
sitename="DynamicPPL",
Expand Down
35 changes: 33 additions & 2 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,23 +154,56 @@ AbstractVarInfo

### Common API

#### Accumulation of log-probabilities

```@docs
getlogp
setlogp!!
acclogp!!
resetlogp!!
```

#### Variables and their realizations

```@docs
keys
getindex
DynamicPPL.getindex_raw
push!!
empty!!
isempty
```

```@docs
values_as
```

#### Transformations

```@docs
DynamicPPL.AbstractTransformation
DynamicPPL.NoTransformation
DynamicPPL.DynamicTransformation
DynamicPPL.StaticTransformation
```

```@docs
DynamicPPL.istrans
DynamicPPL.settrans!!
DynamicPPL.transformation
DynamicPPL.link!!
DynamicPPL.invlink!!
DynamicPPL.default_transformation
DynamicPPL.maybe_invlink_before_eval!!
```

#### Utils

```@docs
DynamicPPL.unflatten
DynamicPPL.tonamedtuple
```

#### `SimpleVarInfo`

```@docs
Expand All @@ -189,10 +222,8 @@ TypedVarInfo
One main characteristic of [`VarInfo`](@ref) is that samples are stored in a linearized form.

```@docs
tonamedtuple
link!
invlink!
istrans
```

```@docs
Expand Down
15 changes: 12 additions & 3 deletions src/DynamicPPL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ export AbstractVarInfo,
setorder!,
istrans,
link!,
link!!,
invlink!,
invlink!!,
tonamedtuple,
values_as,
# VarName (reexport from AbstractPPL)
Expand Down Expand Up @@ -125,27 +127,33 @@ export loglikelihood
# Used here and overloaded in Turing
function getspace end

# Necessary forward declarations
"""
AbstractVarInfo

Abstract supertype for data structures that capture random variables when executing a
probabilistic model and accumulate log densities such as the log likelihood or the
log joint probability of the model.

See also: [`VarInfo`](@ref)
See also: [`VarInfo`](@ref), [`SimpleVarInfo`](@ref).
"""
abstract type AbstractVarInfo <: AbstractModelTrace end

const LEGACY_WARNING = """
!!! warning
This method is considered legacy, and is likely to be deprecated in the future.
"""

# Necessary forward declarations
include("utils.jl")
include("selector.jl")
include("model.jl")
include("sampler.jl")
include("varname.jl")
include("distribution_wrappers.jl")
include("contexts.jl")
include("varinfo.jl")
include("abstract_varinfo.jl")
include("threadsafe.jl")
include("varinfo.jl")
include("simple_varinfo.jl")
include("context_implementations.jl")
include("compiler.jl")
Expand All @@ -154,5 +162,6 @@ include("compat/ad.jl")
include("loglikelihoods.jl")
include("submodel_macro.jl")
include("test_utils.jl")
include("transforming.jl")

end # module
Loading