Skip to content

Commit f670195

Browse files
authored
Merge pull request #144 from TuringLang/dev
Update master
2 parents 06e7fe0 + c40bde6 commit f670195

22 files changed

+1034
-91
lines changed

.github/workflows/CompatHelper.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ jobs:
88
CompatHelper:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: julia-actions/setup-julia@latest
12-
with:
13-
version: 1.3
1411
- name: Pkg.add("CompatHelper")
1512
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
1613
- name: CompatHelper.main()
1714
env:
1815
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19-
run: julia -e 'using CompatHelper; CompatHelper.main()'
16+
COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}
17+
run: julia -e 'using CompatHelper; CompatHelper.main(; master_branch = "dev")'

.github/workflows/TagBot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: TagBot
22
on:
33
schedule:
4-
- cron: 0 * * * *
4+
- cron: 0 0 * * *
55
jobs:
66
TagBot:
77
runs-on: ubuntu-latest

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1212
ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444"
1313

1414
[compat]
15-
AbstractMCMC = "1.0"
16-
Bijectors = "0.5.2, 0.6, 0.7"
15+
AbstractMCMC = "1"
16+
Bijectors = "0.5.2, 0.6, 0.7, 0.8"
1717
Distributions = "0.22, 0.23"
1818
MacroTools = "0.5.1"
1919
ZygoteRules = "0.2"

src/context_implementations.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ function dot_tilde(
177177
else
178178
vns, dist = get_vns_and_dist(right, left, vn)
179179
end
180-
return _dot_tilde(rng, sampler, NoDist(dist), left, vns, vi)
180+
return _dot_tilde(rng, sampler, NoDist.(dist), left, vns, vi)
181181
end
182182
function dot_tilde(rng, ctx::MiniBatchContext, sampler, right, left, vn::VarName, inds, vi)
183183
return dot_tilde(rng, ctx.ctx, sampler, right, left, vn, inds, vi)

src/prob_macro.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ _setval!(vi::TypedVarInfo, c::AbstractChains) = _setval!(vi.metadata, vi, c)
233233
return Expr(:block, map(names) do n
234234
quote
235235
for vn in md.$n.vns
236-
val = copy.(vec(c[Symbol(string(vn))].value))
236+
val = vec(c[Symbol(vn)])
237237
setval!(vi, val, vn)
238238
settrans!(vi, false, vn)
239239
end

test/Turing/Turing.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ using Requires, Reexport, ForwardDiff
1212
using DistributionsAD, Bijectors, StatsFuns, SpecialFunctions
1313
using Statistics, LinearAlgebra
1414
using Libtask
15-
@reexport using Distributions, MCMCChains, Libtask, AbstractMCMC
15+
@reexport using Distributions, MCMCChains, Libtask, AbstractMCMC, Bijectors
1616
using Tracker: Tracker
1717

1818
import DynamicPPL: getspace, NoDist, NamedDist
@@ -58,6 +58,11 @@ using .Variational
5858
end
5959
end
6060

61+
@init @require Optim="429524aa-4258-5aef-a3af-852621145aeb" @eval begin
62+
include("modes/ModeEstimation.jl")
63+
export MAP, MLE, optimize
64+
end
65+
6166
###########
6267
# Exports #
6368
###########
@@ -71,6 +76,7 @@ export @model, # modelling
7176

7277
MH, # classic sampling
7378
RWMH,
79+
Emcee,
7480
ESS,
7581
Gibbs,
7682

@@ -87,7 +93,7 @@ export @model, # modelling
8793
CSMC,
8894
PG,
8995

90-
vi, # variational inference
96+
vi, # variational inference
9197
ADVI,
9298

9399
sample, # inference

test/Turing/inference/AdvancedSMC.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ struct PG{space,R} <: ParticleInference
170170
resampler::R
171171
end
172172

173+
isgibbscomponent(::PG) = true
174+
173175
"""
174176
PG(n, space...)
175177
PG(n, [resampler = ResampleWithESSThreshold(), space = ()])

0 commit comments

Comments
 (0)