TuringLang/Turing.jl: v0.38.0
Authors/Creators
- Kai Xu
- Hong Ge1
- Cameron Pfiffer2
- David Widmann3
- Martin Trapp4
- Tor Erlend Fjelde5
- Mohamed Tarek3
- Emile Mathieu1
- Markus Hauru
- Will Tebbutt
- Penelope Yong
- Adam Scibior6
- Killian Q. Zhuo7
- Hessam Mehr8
- Xianda Sun
- Emma Smith
- Philipp Gabler
- Jaime RZ9
- Harry Wilde10
- Arthur Lui
- FredericWantiez
- Pietro Monticone11
- Tom Röschinger
- azev7712
- Kyurae Kim13
- Peifan Wu14
- Phillip Alday15
- Ramon Diaz-Uriarte16
- Saranjeet Kaur
- 1. University of Cambridge
- 2. @dottxt-ai
- 3. @PumasAI
- 4. Aalto University
- 5. @TuringLang
- 6. University of British Columbia
- 7. None
- 8. University of Glasgow
- 9. UCL
- 10. @nestauk @dssg @turinglang @knowlab @BHFDSC
- 11. University of Trento
- 12. Fowler College of Business, SDSU
- 13. University of Pennsylvania
- 14. Google
- 15. Beacon Biosignals
- 16. Universidad Autonoma de Madrid
Description
Turing v0.38.0
:
Breaking changes
DynamicPPL compatibility has been bumped to 0.36. This brings with it a number of changes: the ones most likely to affect you are submodel prefixing and conditioning. Variables in submodels are now represented correctly with field accessors. For example:
using Turing
@model inner() = x ~ Normal()
@model outer() = a ~ to_submodel(inner())
keys(VarInfo(outer())) now returns [@varname(a.x)] instead of [@varname(var"a.x")]
Furthermore, you can now either condition on the outer model like outer() | (@varname(a.x) => 1.0), or the inner model like inner() | (@varname(x) => 1.0).
If you use the conditioned inner model as a submodel, the conditioning will still apply correctly.
Please see the DynamicPPL release notes for fuller details.
Gibbs sampler
Turing's Gibbs sampler now allows for more complex VarNames, such as x[1] or x.a, to be used.
For example, you can now do this:
@model function f()
x = Vector{Float64}(undef, 2)
x[1] ~ Normal()
return x[2] ~ Normal()
end
sample(f(), Gibbs(@varname(x[1]) => MH(), @varname(x[2]) => MH()), 100)
Performance for the cases which used to previously work (i.e. VarNames like x which only consist of a single symbol) is unaffected, and VarNames with only field accessors (e.g. x.a) should be equally fast.
It is possible that VarNames with indexing (e.g. x[1]) may be slower (although this is still an improvement over not working at all!).
If you find any cases where you think the performance is worse than it should be, please do file an issue.
Merged pull requests:
- Add
check_modelargument to optimisation (#2518) (@penelopeysm) - Add PR auto assign workflow (#2528) (@penelopeysm)
- DynamicPPL 0.36 (#2535) (@penelopeysm)
- DocsGHA: Grant write permission to pull-requests event (#2544) (@shravanngoswamii)
- Update docstrings to account for non-identity varnames (#2546) (@penelopeysm)
Closed issues:
- New Turing domain: please visit turinglang.org (#2041)
- Allow Gibbs sampler to have non-identity lenses for target variables (#2403)
- Figure out a consistent and robust way of defining and testing interfaces (#2434)
- Clean up exports (#2468)
- Clean up LogDensityFunctions interface code +
setADtype(#2473) prefixshould be exported (#2481)- Enzyme illegal type analysis on many Turing models (#2510)
NaNerror during sampling withNUTSin Hidden Markov Model (#2513)- Bug: Incorrect Variance Test in
check_dist_numerical(#2514) - NaN in dataset leads to NaN parameters and difficult-to-interpret errors (#2515)
- Can't find initial parameters in HMM with deterministic emissions (#2526)
- Run formatter, start using always_use_return = true (#2530)
- Remove
extract_priors(#2537)
Files
TuringLang/Turing.jl-v0.38.0.zip
Files
(175.2 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:ecf5f237bb791c6da94b2ac72c4516b8
|
175.2 kB | Preview Download |
Additional details
Related works
- Is supplement to
- Software: https://github.com/TuringLang/Turing.jl/tree/v0.38.0 (URL)
Software
- Repository URL
- https://github.com/TuringLang/Turing.jl