Skip to content

Commit b72c8cb

Browse files
committed
fix extsampler
1 parent 22ba733 commit b72c8cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

usage/external-samplers/index.qmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ end
3737
Now we sample the model to generate some observations, which we can then condition on.
3838

3939
```{julia}
40-
(; x) = rand(funnel() | (θ=0,))
41-
model = funnel() | (; x);
40+
vnt = rand(funnel() | (θ=0,))
41+
model = funnel() | (; x=vnt[@varname(x)]);
4242
```
4343

4444
Users can use any sampler algorithm to sample this model if it follows the `AbstractMCMC` API.
@@ -146,4 +146,4 @@ In general, we recommend that the `AbstractMCMC` interface is implemented direct
146146
However, any DynamicPPL- or Turing-specific functionality is best implemented in a `MySamplerTuringExt` extension.
147147

148148
[^1]: Xu et al., [AdvancedHMC.jl: A robust, modular and efficient implementation of advanced HMC algorithms](http://proceedings.mlr.press/v118/xu20a/xu20a.pdf), 2019
149-
[^2]: Zhang et al., [Pathfinder: Parallel quasi-Newton variational inference](https://arxiv.org/abs/2108.03782), 2021
149+
[^2]: Zhang et al., [Pathfinder: Parallel quasi-Newton variational inference](https://arxiv.org/abs/2108.03782), 2021

0 commit comments

Comments
 (0)