Commit 299e17b
Accumulators, stage 1 (#885)
* Release 0.36
* AbstractPPL 0.11 + change prefixing behaviour (#830)
* AbstractPPL 0.11; change prefixing behaviour
* Use DynamicPPL.prefix rather than overloading
* Remove VarInfo(VarInfo, params) (#870)
* Unify `{untyped,typed}_{vector_,}varinfo` constructor functions (#879)
* Unify {Untyped,Typed}{Vector,}VarInfo constructors
* Update invocations
* NTVarInfo
* Fix tests
* More fixes
* Fixes
* Fixes
* Fixes
* Use lowercase functions, don't deprecate VarInfo
* Rewrite VarInfo docstring
* Fix methods
* Fix methods (really)
* Draft of accumulators
* Fix some variable names
* Fix pointwise_logdensities, gut tilde_observe, remove resetlogp!!
* Map rather than broadcast
Co-authored-by: Tor Erlend Fjelde <tor.erlend95@gmail.com>
* Start documenting accumulators
* Use Val{symbols} instead of AccTypes to index
* More documentation for accumulators
* Link varinfo by default in AD testing utilities; make test suite run on linked varinfos (#890)
* Link VarInfo by default
* Tweak interface
* Fix tests
* Fix interface so that callers can inspect results
* Document
* Fix tests
* Fix changelog
* Test linked varinfos
Closes #891
* Fix docstring + use AbstractFloat
* Fix resetlogp!! and type stability for accumulators
* Fix type rigidity of LogProbs and NumProduce
* Fix uses of getlogp and other assorted issues
* setaccs!! nicer interface and logdensity function fixes
* Revert back to calling the macro @addlogprob!
* Remove a dead test
* Clarify a comment
* Implement split/combine for PointwiseLogdensityAccumulator
* Switch ThreadSafeVarInfo.accs_by_thread to be a tuple
* Fix `condition` and `fix` in submodels (#892)
* Fix conditioning in submodels
* Simplify contextual_isassumption
* Add documentation
* Fix some tests
* Add tests; fix a bunch of nested submodel issues
* Fix fix as well
* Fix doctests
* Add unit tests for new functions
* Add changelog entry
* Update changelog
Co-authored-by: Hong Ge <3279477+yebai@users.noreply.github.com>
* Finish docs
* Add a test for conditioning submodel via arguments
* Clean new tests up a bit
* Fix for VarNames with non-identity lenses
* Apply suggestions from code review
Co-authored-by: Markus Hauru <markus@mhauru.org>
* Apply suggestions from code review
* Make PrefixContext contain a varname rather than symbol (#896)
---------
Co-authored-by: Hong Ge <3279477+yebai@users.noreply.github.com>
Co-authored-by: Markus Hauru <markus@mhauru.org>
* Revert ThreadSafeVarInfo back to Vectors and fix some AD type casting in (Simple)VarInfo
* Improve accumulator docs
* Add test/accumulators.jl
* Docs fixes
* Various small fixes
* Make DynamicTransformation not use accumulators other than LogPrior
* Fix variable order and name of map_accumulator!!
* Typo fixing
* Small improvement to ThreadSafeVarInfo
* Fix demo_dot_assume_observe_submodel prefixing
* Typo fixing
* Miscellaneous small fixes
* HISTORY entry and more miscellanea
* Add more tests for accumulators
* Improve accumulators docstrings
* Fix a typo
* Expand HISTORY entry
* Add accumulators to API docs
* Remove unexported functions from API docs
* Add NamedTuple methods for get/set/acclogp
* Fix setlogp!! with single scalar to error
* Export AbstractAccumulator, fix a docs typo
* Apply suggestions from code review
Co-authored-by: Penelope Yong <penelopeysm@gmail.com>
* Rename LogPrior -> LogPriorAccumulator, and Likelihood and NumProduce
* Type bound log prob accumulators with T<:Real
* Add @addlogprior! and @addloglikelihood!
* Apply suggestions from code review
Co-authored-by: Penelope Yong <penelopeysm@gmail.com>
* Move default accumulators to default_accumulators.jl
* Fix some tests
* Introduce default_accumulators()
* Go back to only having @addlogprob!
* Fix tilde_observe!! prefixing
* Fix default_accumulators internal type
* Make unflatten more type stable, and add a test for it
* Always print all benchmark results
* Move NumProduce VI functions to abstract_varinfo.jl
---------
Co-authored-by: Penelope Yong <penelopeysm@gmail.com>
Co-authored-by: Tor Erlend Fjelde <tor.erlend95@gmail.com>
Co-authored-by: Hong Ge <3279477+yebai@users.noreply.github.com>1 parent 8135113 commit 299e17b
File tree
42 files changed
+1768
-915
lines changed- benchmarks
- docs/src
- ext
- src
- test_utils
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
42 files changed
+1768
-915
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
3 | 21 | | |
4 | 22 | | |
5 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
332 | | - | |
333 | | - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
348 | 364 | | |
349 | 365 | | |
350 | 366 | | |
| |||
353 | 369 | | |
354 | 370 | | |
355 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
356 | 379 | | |
357 | 380 | | |
358 | 381 | | |
| |||
427 | 450 | | |
428 | 451 | | |
429 | 452 | | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | 453 | | |
434 | 454 | | |
435 | 455 | | |
| |||
476 | 496 | | |
477 | 497 | | |
478 | 498 | | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
53 | 61 | | |
| 62 | + | |
| 63 | + | |
54 | 64 | | |
| 65 | + | |
| 66 | + | |
55 | 67 | | |
56 | 68 | | |
57 | | - | |
58 | | - | |
59 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
60 | 72 | | |
61 | 73 | | |
62 | 74 | | |
| |||
92 | 104 | | |
93 | 105 | | |
94 | 106 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | 107 | | |
99 | 108 | | |
100 | 109 | | |
101 | | - | |
102 | 110 | | |
103 | | - | |
104 | 111 | | |
105 | 112 | | |
106 | 113 | | |
| |||
146 | 153 | | |
147 | 154 | | |
148 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
149 | 159 | | |
150 | 160 | | |
151 | 161 | | |
| |||
166 | 176 | | |
167 | 177 | | |
168 | 178 | | |
| 179 | + | |
| 180 | + | |
169 | 181 | | |
170 | 182 | | |
171 | 183 | | |
| |||
0 commit comments