Skip to content

Commit 119c818

Browse files
committed
InitContext isn't for 0.37, update comments
1 parent 27aab23 commit 119c818

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/mcmc/abstractmcmc.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# TODO: Implement additional checks for certain samplers, e.g.
22
# HMC not supporting discrete parameters.
33
function _check_model(model::DynamicPPL.Model)
4-
# TODO(DPPL0.37/penelopeysm): use InitContext
4+
# TODO(DPPL0.38/penelopeysm): use InitContext
55
spl_model = DynamicPPL.contextualize(model, DynamicPPL.SamplingContext(model.context))
66
return DynamicPPL.check_model(spl_model, VarInfo(); error_on_failure=true)
77
end

src/mcmc/emcee.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function AbstractMCMC.step(
5353
length(initial_params) == n ||
5454
throw(ArgumentError("initial parameters have to be specified for each walker"))
5555
vis = map(vis, initial_params) do vi, init
56-
# TODO(DPPL0.37/penelopeysm) This whole thing can be replaced with init!!
56+
# TODO(DPPL0.38/penelopeysm) This whole thing can be replaced with init!!
5757
vi = DynamicPPL.initialize_parameters!!(vi, init, model)
5858

5959
# Update log joint probability.

src/mcmc/ess.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ EllipticalSliceSampling.isgaussian(::Type{<:ESSPrior}) = true
8484
function Base.rand(rng::Random.AbstractRNG, p::ESSPrior)
8585
varinfo = p.varinfo
8686
# TODO: Surely there's a better way of doing this now that we have `SamplingContext`?
87-
# TODO(DPPL0.37/penelopeysm): This can be replaced with `init!!(p.model,
87+
# TODO(DPPL0.38/penelopeysm): This can be replaced with `init!!(p.model,
8888
# p.varinfo, PriorInit())` after TuringLang/DynamicPPL.jl#984. The reason
8989
# why we had to use the 'del' flag before this was because
9090
# SampleFromPrior() wouldn't overwrite existing variables.

src/mcmc/mh.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ get_varinfo(s::MHState) = s.varinfo
178178
# Utility functions #
179179
#####################
180180

181-
# TODO(DPPL0.37/penelopeysm): This function should no longer be needed
181+
# TODO(DPPL0.38/penelopeysm): This function should no longer be needed
182182
# once InitContext is merged.
183183
"""
184184
set_namedtuple!(vi::VarInfo, nt::NamedTuple)
@@ -207,7 +207,7 @@ end
207207
# NOTE(penelopeysm): MH does not conform to the usual LogDensityProblems
208208
# interface in that it gets evaluated with a NamedTuple. Hence we need this
209209
# method just to deal with MH.
210-
# TODO(DPPL0.37/penelopeysm): Check the extent to which this method is actually
210+
# TODO(DPPL0.38/penelopeysm): Check the extent to which this method is actually
211211
# needed. If it's still needed, replace this with `init!!(f.model, f.varinfo,
212212
# ParamsInit(x))`. Much less hacky than `set_namedtuple!` (hopefully...).
213213
# In general, we should much prefer to either (1) conform to the

src/mcmc/prior.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function AbstractMCMC.step(
1212
state=nothing;
1313
kwargs...,
1414
)
15-
# TODO(DPPL0.37/penelopeysm): replace with init!!
15+
# TODO(DPPL0.38/penelopeysm): replace with init!!
1616
sampling_model = DynamicPPL.contextualize(
1717
model, DynamicPPL.SamplingContext(rng, DynamicPPL.SampleFromPrior(), model.context)
1818
)

0 commit comments

Comments
 (0)