Skip to content

Commit

Permalink
Remove default_varinfo function
Browse files Browse the repository at this point in the history
  • Loading branch information
penelopeysm committed Oct 17, 2024
1 parent 54691bf commit 632ab09
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/sampler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,6 @@ function AbstractMCMC.step(
return vi, nothing
end

function default_varinfo(rng::Random.AbstractRNG, model::Model, sampler::AbstractSampler)
return default_varinfo(rng, model, sampler, DefaultContext())
end
function default_varinfo(
rng::Random.AbstractRNG,
model::Model,
sampler::AbstractSampler,
context::AbstractContext,
)
init_sampler = initialsampler(sampler)
return VarInfo(rng, model, init_sampler, context)
end

function AbstractMCMC.sample(
rng::Random.AbstractRNG,
model::Model,
Expand All @@ -100,7 +87,7 @@ function AbstractMCMC.step(
rng::Random.AbstractRNG, model::Model, spl::Sampler; initial_params=nothing, kwargs...
)
# Sample initial values.
vi = default_varinfo(rng, model, spl)
vi = typed_varinfo(rng, model, initialsampler(spl), DefaultContext())

# Update the parameters if provided.
if initial_params !== nothing
Expand Down

0 comments on commit 632ab09

Please sign in to comment.