Skip to content

Release v0.37 #2487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Mar 19, 2025
Prev Previous commit
Next Next commit
Fix call to DynamicPPL.initialize_parameters!!
  • Loading branch information
mhauru committed Mar 14, 2025
commit f904f9981dc687d04dfa6a13d94d45013a093729
2 changes: 1 addition & 1 deletion src/mcmc/gibbs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
return DynamicPPL.contextualize(model, gibbs_context), gibbs_context_inner
end

wrap_in_sampler(x::AbstractMCMC.AbstractSampler) = x

Check warning on line 232 in src/mcmc/gibbs.jl

View check run for this annotation

Codecov / codecov/patch

src/mcmc/gibbs.jl#L232

Added line #L232 was not covered by tests
wrap_in_sampler(x::InferenceAlgorithm) = DynamicPPL.Sampler(x)

to_varname_list(x::Union{VarName,Symbol}) = [VarName(x)]
Expand Down Expand Up @@ -312,7 +312,7 @@

# Update the parameters if provided.
if initial_params !== nothing
vi = DynamicPPL.initialize_parameters!!(vi, initial_params, spl, model)
vi = DynamicPPL.initialize_parameters!!(vi, initial_params, model)

# Update joint log probability.
# This is a quick fix for https://github.com/TuringLang/Turing.jl/issues/1588
Expand Down Expand Up @@ -527,7 +527,7 @@
state::TuringState,
params::AbstractVarInfo,
)
logdensity = DynamicPPL.LogDensityFunction(

Check warning on line 530 in src/mcmc/gibbs.jl

View check run for this annotation

Codecov / codecov/patch

src/mcmc/gibbs.jl#L530

Added line #L530 was not covered by tests
model, state.ldf.varinfo, state.ldf.context; adtype=sampler.alg.adtype
)
new_inner_state = setparams_varinfo!!(
Expand Down
Loading