Skip to content

Commit

Permalink
Merge pull request #99 from itsdfish/master
Browse files Browse the repository at this point in the history
Merge updates for .7.2
  • Loading branch information
itsdfish authored May 10, 2020
2 parents cc74c4e + 53c169b commit dc9b1b6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MCMCBenchmarks"
uuid = "72ce6e51-3f7f-5ebd-8e88-b86aa3e31c30"
authors = ["Christopher R. Fisher, Rob J. Goedman"]
version = "0.7.1"
version = "0.7.2"

[deps]
AdvancedHMC = "0bf59076-c3b1-5ca4-86bd-e02cd72cde3d"
Expand Down Expand Up @@ -35,7 +35,7 @@ Turing = "fce5fe82-541a-59a6-adf8-730c64b5f9a0"
AdvancedHMC = "^0.2"
CSV = "^0.5, 0.6"
CmdStan = "^5.2, 6.0"
DataFrames = "^0.19, 0.20, 0.21"
DataFrames = "0.21.0"
Distributions = "^0.21, 0.22, 0.23"
DynamicHMC = "^2.1"
FillArrays = "^0.8"
Expand All @@ -51,7 +51,7 @@ SpecialFunctions = "^0.8, 0.9, 0.10"
StatsPlots = "^0.12, 0.13, 0.14"
Tracker = "^0.2"
TransformVariables = "^0.3"
Turing = "^0.9, 0.10, 0.11, 0.12"
Turing = "^0.9, 0.10, 0.11, 0.12.0"
julia = "^1"

[extras]
Expand Down
2 changes: 1 addition & 1 deletion src/core_benchmarking.jl
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ function modifyConfig!(s::AHMCNUTS; Nsamples, Nadapt, delta, autodiff=:forward,
s.config = Turing.NUTS(Nadapt, delta)
s.Nsamples = Nsamples
println("Nsamples" , Nsamples)
s.autodiff = autodiff == :reverse ? Turing.setadbackend(:reverse_diff) : Turing.setadbackend(:forward_diff)
s.autodiff = autodiff == :reverse ? Turing.setadbackend(:reverse_diff) : Turing.setadbackend(:forwarddiff)
end

function modifyConfig!(s::CmdStanNUTS; Nsamples, Nadapt, delta, kwargs...)
Expand Down
3 changes: 2 additions & 1 deletion src/plotting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ end
se(x) = std(x)/sqrt(length(x))

function summarize(df, metric, grouping, func)
newDF= by(df, grouping, metric=>func)
g = groupby(df, grouping)
newDF= combine(g, metric=>func)
yvar = names(newDF)[end]
return newDF,yvar
end
2 changes: 1 addition & 1 deletion test/Gaussian_Models.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function sampleDHMC(obs, N, nsamples, autodiff)
results = mcmc_with_warmup(Random.GLOBAL_RNG, ∇P, nsamples; reporter = NoProgressReport())

# Undo the transformation to obtain the posterior from the chain.
posterior = transform.(trans, results.chain)
posterior = TransformVariables.transform.(trans, results.chain)
return nptochain(results, posterior)
end

Expand Down

0 comments on commit dc9b1b6

Please sign in to comment.