Skip to content

Commit d17e6c9

Browse files
committed
Merge branch 'master' into tor/dppl-update
2 parents 46a00a8 + d924caf commit d17e6c9

File tree

17 files changed

+98
-91
lines changed

17 files changed

+98
-91
lines changed

Project.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "Turing"
22
uuid = "fce5fe82-541a-59a6-adf8-730c64b5f9a0"
3-
version = "0.16.2"
3+
version = "0.17.0"
44

55
[deps]
66
AbstractMCMC = "80f14c24-f653-4e6a-9b94-39d6b0f70001"
@@ -34,20 +34,20 @@ ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444"
3434

3535
[compat]
3636
AbstractMCMC = "3.2"
37-
AdvancedHMC = "0.2.24"
37+
AdvancedHMC = "0.3.0"
3838
AdvancedMH = "0.6"
39-
AdvancedPS = "0.2"
39+
AdvancedPS = "0.2.4"
4040
AdvancedVI = "0.1"
4141
BangBang = "0.3"
4242
Bijectors = "0.8, 0.9"
4343
DataStructures = "0.18"
4444
Distributions = "0.23.3, 0.24, 0.25"
4545
DistributionsAD = "0.6"
4646
DocStringExtensions = "0.8"
47-
DynamicPPL = "0.12.1"
47+
DynamicPPL = "0.12.1, 0.13, 0.14"
4848
EllipticalSliceSampling = "0.4"
4949
ForwardDiff = "0.10.3"
50-
Libtask = "= 0.4.0, = 0.4.1, = 0.4.2, = 0.5.0, = 0.5.1"
50+
Libtask = "0.4, 0.5.3"
5151
MCMCChains = "4"
5252
NamedArrays = "0.9"
5353
Reexport = "0.2, 1"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
[![Coverage Status](https://coveralls.io/repos/github/TuringLang/Turing.jl/badge.svg?branch=master)](https://coveralls.io/github/TuringLang/Turing.jl?branch=master)
55
[![codecov](https://codecov.io/gh/TuringLang/Turing.jl/branch/master/graph/badge.svg?token=OiUBsnDQqf)](https://codecov.io/gh/TuringLang/Turing.jl)
66
[![Documentation](https://img.shields.io/badge/doc-latest-blue.svg)](https://turing.ml/dev/docs/using-turing/)
7+
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
78

89
**Turing.jl** is a Julia library for general-purpose [probabilistic programming](https://en.wikipedia.org/wiki/Probabilistic_programming_language). Turing allows the user to write models using standard Julia syntax, and provides a wide range of sampling-based inference methods for solving problems across probabilistic machine learning, Bayesian statistics, and data science. Compared to other probabilistic programming languages, Turing has a special focus on modularity, and decouples the modelling language (i.e. the compiler) and inference methods. This modular design, together with the use of a high-level numerical language Julia, makes Turing particularly extensible: new model families and inference methods can be easily added.
910

docs/pages/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
flux:
3737
image_path: /tutorials/figures/3_BayesNN_12_1.svg
38-
excerpt: "Turing supports Julia's [Flux](http://fluxml.ai/) package for automatic differentiation. Combine Turing and Flux to construct probabalistic variants of traditional machine learning models."
38+
excerpt: "Turing supports Julia's [Flux](http://fluxml.ai/) package for automatic differentiation. Combine Turing and Flux to construct probabilistic variants of traditional machine learning models."
3939
url: "/tutorials/3-bayesnn"
4040

4141
ecosystem:

docs/src/tutorials/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: Tutorials
77
This section contains tutorials on how to implement common models in Turing. If you prefer to have an interactive Jupyter notebook, please fork or download the [TuringTutorials](https://github.com/TuringLang/TuringTutorials) repository.
88

99

10-
A list of all the tutorials available can be found to the left. The [introduction]({{site.baseurl}}/tutorials/0-introduction) tutorial contains an introduction to coin flipping with Turing and a brief overview of probabalistic programming.
10+
A list of all the tutorials available can be found to the left. The [introduction]({{site.baseurl}}/tutorials/0-introduction) tutorial contains an introduction to coin flipping with Turing and a brief overview of probabilistic programming.
1111

1212

1313
Tutorials are under continuous development, but there are some older version available at the TuringTutorials within the [`old-notebooks`](https://github.com/TuringLang/TuringTutorials/tree/master/old-notebooks/) section. Some of these were built using prior versions of Turing and may not function correctly, but they can assist in the syntax used for common models.

docs/src/using-turing/guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ end
4545
Note: As a sanity check, the expectation of `s` is 49/24 (2.04166666...) and the expectation of `m` is 7/6 (1.16666666...).
4646

4747

48-
We can perform inference by using the `sample` function, the first argument of which is our probabalistic program and the second of which is a sampler. More information on each sampler is located in the [API]({{site.baseurl}}/docs/library).
48+
We can perform inference by using the `sample` function, the first argument of which is our probabilistic program and the second of which is a sampler. More information on each sampler is located in the [API]({{site.baseurl}}/docs/library).
4949

5050

5151
```julia

docs/src/using-turing/performancetips.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Alternatively, you could use `filldist` in this example:
8585

8686
```julia
8787
@model function tmodel(x, y)
88-
params = filldist(truncated(Normal(), 0, Inf), size(x, 2))
88+
params ~ filldist(truncated(Normal(), 0, Inf), size(x, 2))
8989
a = x * params
9090
y ~ MvNormal(a, 1.0)
9191
end

docs/src/using-turing/quick-start.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
2-
title: Probablistic Programming in Thirty Seconds
2+
title: Probabilistic Programming in Thirty Seconds
33
---
44

5-
# Probablistic Programming in Thirty Seconds
5+
# Probabilistic Programming in Thirty Seconds
66

77
If you are already well-versed in probabilistic programming and just want to take a quick look at how Turing's syntax works or otherwise just want a model to start with, we have provided a Bayesian coin-flipping model to play with.
88

99

1010
This example can be run on however you have Julia installed (see [Getting Started]({{site.baseurl}}/docs/using-turing/get-started)), but you will need to install the packages `Turing` and `StatsPlots` if you have not done so already.
1111

1212

13-
This is an excerpt from a more formal example introducing probabilistic programming which can be found in Jupyter notebook form [here](https://nbviewer.jupyter.org/github/TuringLang/TuringTutorials/blob/master/0_Introduction.ipynb) or as part of the documentation website [here]({{site.baseurl}}/tutorials).
13+
This is an excerpt from a more formal example introducing probabilistic programming which can be found in Jupyter notebook form [here](https://nbviewer.jupyter.org/github/TuringLang/TuringTutorials/blob/master/notebook/00-introduction/00_introduction.ipynb) or as part of the documentation website [here]({{site.baseurl}}/tutorials).
1414

1515

1616
```julia

src/Turing.jl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
module Turing
22

3-
##############
4-
# Dependency #
5-
########################################################################
6-
# NOTE: when using anything from external packages, #
7-
# let's keep the practice of explictly writing Package.something #
8-
# to indicate that's not implemented inside Turing.jl #
9-
########################################################################
10-
113
using Requires, Reexport, ForwardDiff
124
using DistributionsAD, Bijectors, StatsFuns, SpecialFunctions
135
using Statistics, LinearAlgebra

src/inference/AdvancedSMC.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ function AbstractMCMC.step(
301301
particles = AdvancedPS.ParticleContainer(x)
302302

303303
# Perform a particle sweep.
304-
logevidence = AdvancedPS.sweep!(rng, particles, spl.alg.resampler)
304+
logevidence = AdvancedPS.sweep!(rng, particles, spl.alg.resampler, reference)
305305

306306
# Pick a particle to be retained.
307307
Ws = AdvancedPS.getweights(particles)

src/inference/Inference.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,8 @@ function AbstractMCMC.bundle_samples(
325325
save_state = false,
326326
stats = missing,
327327
sort_chain = false,
328+
discard_initial = 0,
329+
thinning = 1,
328330
kwargs...
329331
)
330332
# Convert transitions to array format.
@@ -363,6 +365,8 @@ function AbstractMCMC.bundle_samples(
363365
(internals = extra_params,);
364366
evidence=le,
365367
info=info,
368+
start=discard_initial + 1,
369+
thin=thinning,
366370
)
367371

368372
return sort_chain ? sort(chain) : chain

0 commit comments

Comments
 (0)