Skip to content

Commit 0a6a10b

Browse files
Copilotyebai
andauthored
Fix typos in comments and variable names (#2665)
* Initial plan * Fix typos in comments and code Co-authored-by: yebai <3279477+yebai@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: yebai <3279477+yebai@users.noreply.github.com>
1 parent 5a3f7aa commit 0a6a10b

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

src/mcmc/Inference.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export InferenceAlgorithm,
8181
externalsampler
8282

8383
###############################################
84-
# Abstract inferface for inference algorithms #
84+
# Abstract interface for inference algorithms #
8585
###############################################
8686

8787
include("algorithm.jl")

src/mcmc/gibbs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ end
601601
match_linking!!(varinfo_local, prev_state_local, model)
602602
603603
Make sure the linked/invlinked status of varinfo_local matches that of the previous
604-
state for this sampler. This is relevant when multilple samplers are sampling the same
604+
state for this sampler. This is relevant when multiple samplers are sampling the same
605605
variables, and one might need it to be linked while the other doesn't.
606606
"""
607607
function match_linking!!(varinfo_local, prev_state_local, model)

src/mcmc/particle_mcmc.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,8 @@ function DynamicPPL.initialstep(
333333

334334
# Pick a particle to be retained.
335335
Ws = AdvancedPS.getweights(particles)
336-
indx = AdvancedPS.randcat(rng, Ws)
337-
reference = particles.vals[indx]
336+
index = AdvancedPS.randcat(rng, Ws)
337+
reference = particles.vals[index]
338338

339339
# Compute the first transition.
340340
_vi = reference.model.f.varinfo
@@ -373,8 +373,8 @@ function AbstractMCMC.step(
373373

374374
# Pick a particle to be retained.
375375
Ws = AdvancedPS.getweights(particles)
376-
indx = AdvancedPS.randcat(rng, Ws)
377-
newreference = particles.vals[indx]
376+
index = AdvancedPS.randcat(rng, Ws)
377+
newreference = particles.vals[index]
378378

379379
# Compute the transition.
380380
_vi = newreference.model.f.varinfo

test/ext/OptimInterface.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ using Turing
134134
# Some of the models have one variance parameter per observation, and so
135135
# the MLE should have the variances set to 0. Since we're working in
136136
# transformed space, this corresponds to `-Inf`, which is of course not achievable.
137-
# In particular, it can result in "early termniation" of the optimization process
137+
# In particular, it can result in "early termination" of the optimization process
138138
# because we hit NaNs, etc. To avoid this, we set the `g_tol` and the `f_tol` to
139139
# something larger than the default.
140140
allowed_incorrect_mle = [

test/mcmc/gibbs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ end
383383
# As above but different samplers and using kwargs.
384384
s3 = Gibbs(:s => CSMC(3), :m => HMCDA(200, 0.65, 0.15))
385385
s4 = Gibbs(@varname(s) => HMC(0.1, 5), @varname(m) => ESS())
386-
# Multiple instnaces of the same sampler. This implements running, in this case,
386+
# Multiple instances of the same sampler. This implements running, in this case,
387387
# 3 steps of HMC on m and 2 steps of PG on m in every iteration of Gibbs.
388388
s5 = begin
389389
hmc = HMC(0.1, 5)

test/optimisation/Optimisation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ using Turing
505505
# Some of the models have one variance parameter per observation, and so
506506
# the MLE should have the variances set to 0. Since we're working in
507507
# transformed space, this corresponds to `-Inf`, which is of course not achievable.
508-
# In particular, it can result in "early termniation" of the optimization process
508+
# In particular, it can result in "early termination" of the optimization process
509509
# because we hit NaNs, etc. To avoid this, we set the `g_tol` and the `f_tol` to
510510
# something larger than the default.
511511
allowed_incorrect_mle = [

0 commit comments

Comments
 (0)