Skip to content

Commit 01306fe

Browse files
Publish docs @ 327b28c
1 parent d2496b1 commit 01306fe

File tree

14 files changed

+138
-138
lines changed

14 files changed

+138
-138
lines changed

developers/inference/abstractmcmc-turing/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -813,12 +813,12 @@ <h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
813813
<div class="cell-output cell-output-display" data-execution_count="1">
814814
<pre><code>Chains MCMC chain (1000×5×1 Array{Float64, 3}):
815815

816-
Log evidence = -3.804595744546419
816+
Log evidence = -3.7356295609322014
817817
Iterations = 1:1:1000
818818
Number of chains = 1
819819
Samples per chain = 1000
820-
Wall duration = 2.65 seconds
821-
Compute duration = 2.65 seconds
820+
Wall duration = 2.48 seconds
821+
Compute duration = 2.48 seconds
822822
parameters = s², m
823823
internals = lp, logprior, loglikelihood
824824

@@ -855,7 +855,7 @@ <h2 class="anchored" data-anchor-id="define-a-sampler">1. Define a Sampler</h2>
855855
<div class="cell-output cell-output-display" data-execution_count="1">
856856
<pre><code>Chains MCMC chain (1000×5×1 Array{Float64, 3}):
857857

858-
Log evidence = -3.734278928282796
858+
Log evidence = -3.711548005273451
859859
Iterations = 1:1:1000
860860
Number of chains = 1
861861
Samples per chain = 1000
@@ -1119,7 +1119,7 @@ <h2 class="anchored" data-anchor-id="overload-assume-and-observe">3. Overload as
11191119
p\left(\theta_{\text{prop}}, x_{\text{obs}}\right)
11201120
\]</span></p>
11211121
<p>with <span class="math inline">\(\theta_{\text{prop}}\)</span> a sample from the proposal and <span class="math inline">\(x_{\text{obs}}\)</span> the observed data.</p>
1122-
<p>This begs the question: how can these functions access model information during sampling? Recall that the model is stored as an instance <code>m</code> of <code>Model</code>. One of the attributes of <code>m</code> is the model evaluation function <code>m.f</code>, which is built by compiling the <code>@model</code> macro. Executing <code>f</code> runs the tilde statements of the model in order, and adds model information to the sampler (the instance of <code>Sampler</code> that stores information about the ongoing sampling process) at each step (see <a href="https://turinglang.org/dev/docs/for-developers/compiler">here</a> for more information about how the <code>@model</code> macro is compiled). The DynamicPPL functions <code>assume</code> and <code>observe</code> determine what kind of information to add to the sampler for every tilde statement.</p>
1122+
<p>This begs the question: how can these functions access model information during sampling? Recall that the model is stored as an instance <code>m</code> of <code>Model</code>. One of the attributes of <code>m</code> is the model evaluation function <code>m.f</code>, which is built by compiling the <code>@model</code> macro. Executing <code>f</code> runs the tilde statements of the model in order, and adds model information to the sampler (the instance of <code>Sampler</code> that stores information about the ongoing sampling process) at each step (see <a href="../../../developers/compiler/model-manual">here</a> for more information about how the <code>@model</code> macro is compiled). The DynamicPPL functions <code>assume</code> and <code>observe</code> determine what kind of information to add to the sampler for every tilde statement.</p>
11231123
<p>Consider an instance <code>m</code> of <code>Model</code> and a sampler <code>spl</code>, with associated <code>VarInfo</code> <code>vi = spl.state.vi</code>. At some point during the sampling process, an AbstractMCMC function such as <code>step!</code> calls <code>m(vi, ...)</code>, which calls the model evaluation function <code>m.f(vi, ...)</code>.</p>
11241124
<ul>
11251125
<li><p>for every tilde statement in the <code>@model</code> macro, <code>m.f(vi, ...)</code> returns model-related information (samples, value of the model density, etc.), and adds it to <code>vi</code>. How does it do that?</p>

faq/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ <h3 class="anchored" data-anchor-id="parallel-sampling-multiple-chains">1. Paral
803803
<li><strong>Multithreaded sampling</strong>: Use <code>MCMCThreads()</code> to run one chain per thread</li>
804804
<li><strong>Distributed sampling</strong>: Use <code>MCMCDistributed()</code> for distributed computing</li>
805805
</ul>
806-
<p>See the <a href="../core-functionality/#sampling-multiple-chains">Core Functionality guide</a> for examples.</p>
806+
<p>See the <a href="../core-functionality#sampling-multiple-chains">Core Functionality guide</a> for examples.</p>
807807
</section>
808808
<section id="threading-within-models" class="level3">
809809
<h3 class="anchored" data-anchor-id="threading-within-models">2. Threading Within Models</h3>

search.json

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

search_original.json

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

sitemap.xml

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,190 +2,190 @@
22
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
33
<url>
44
<loc>https://turinglang.org/docs/changelog.html</loc>
5-
<lastmod>2025-09-26T16:55:51.809Z</lastmod>
5+
<lastmod>2025-09-29T09:14:07.789Z</lastmod>
66
</url>
77
<url>
88
<loc>https://turinglang.org/docs/tutorials/bayesian-neural-networks/index.html</loc>
9-
<lastmod>2025-09-26T16:39:14.142Z</lastmod>
9+
<lastmod>2025-09-29T09:13:10.849Z</lastmod>
1010
</url>
1111
<url>
1212
<loc>https://turinglang.org/docs/tutorials/multinomial-logistic-regression/index.html</loc>
13-
<lastmod>2025-09-26T16:39:14.143Z</lastmod>
13+
<lastmod>2025-09-29T09:13:10.850Z</lastmod>
1414
</url>
1515
<url>
1616
<loc>https://turinglang.org/docs/tutorials/gaussian-mixture-models/index.html</loc>
17-
<lastmod>2025-09-26T16:39:14.142Z</lastmod>
17+
<lastmod>2025-09-29T09:13:10.850Z</lastmod>
1818
</url>
1919
<url>
2020
<loc>https://turinglang.org/docs/tutorials/bayesian-time-series-analysis/index.html</loc>
21-
<lastmod>2025-09-26T16:39:14.142Z</lastmod>
21+
<lastmod>2025-09-29T09:13:10.849Z</lastmod>
2222
</url>
2323
<url>
2424
<loc>https://turinglang.org/docs/tutorials/variational-inference/index.html</loc>
25-
<lastmod>2025-09-26T16:39:14.143Z</lastmod>
25+
<lastmod>2025-09-29T09:13:10.850Z</lastmod>
2626
</url>
2727
<url>
2828
<loc>https://turinglang.org/docs/tutorials/infinite-mixture-models/index.html</loc>
29-
<lastmod>2025-09-26T16:39:14.143Z</lastmod>
29+
<lastmod>2025-09-29T09:13:10.850Z</lastmod>
3030
</url>
3131
<url>
3232
<loc>https://turinglang.org/docs/tutorials/bayesian-logistic-regression/index.html</loc>
33-
<lastmod>2025-09-26T16:39:14.142Z</lastmod>
33+
<lastmod>2025-09-29T09:13:10.849Z</lastmod>
3434
</url>
3535
<url>
3636
<loc>https://turinglang.org/docs/tutorials/bayesian-poisson-regression/index.html</loc>
37-
<lastmod>2025-09-26T16:39:14.142Z</lastmod>
37+
<lastmod>2025-09-29T09:13:10.849Z</lastmod>
3838
</url>
3939
<url>
4040
<loc>https://turinglang.org/docs/uri/troubleshooting.html</loc>
41-
<lastmod>2025-09-26T16:39:14.143Z</lastmod>
41+
<lastmod>2025-09-29T09:13:10.851Z</lastmod>
4242
</url>
4343
<url>
4444
<loc>https://turinglang.org/docs/developers/compiler/minituring-contexts/index.html</loc>
45-
<lastmod>2025-09-26T16:39:14.136Z</lastmod>
45+
<lastmod>2025-09-29T09:13:10.843Z</lastmod>
4646
</url>
4747
<url>
4848
<loc>https://turinglang.org/docs/developers/compiler/model-manual/index.html</loc>
49-
<lastmod>2025-09-26T16:39:14.136Z</lastmod>
49+
<lastmod>2025-09-29T09:13:10.843Z</lastmod>
5050
</url>
5151
<url>
5252
<loc>https://turinglang.org/docs/developers/contexts/submodel-condition/index.html</loc>
53-
<lastmod>2025-09-26T16:39:14.136Z</lastmod>
53+
<lastmod>2025-09-29T09:13:10.844Z</lastmod>
5454
</url>
5555
<url>
5656
<loc>https://turinglang.org/docs/developers/transforms/dynamicppl/index.html</loc>
57-
<lastmod>2025-09-26T16:39:14.141Z</lastmod>
57+
<lastmod>2025-09-29T09:13:10.848Z</lastmod>
5858
</url>
5959
<url>
6060
<loc>https://turinglang.org/docs/developers/contributing/index.html</loc>
61-
<lastmod>2025-09-26T16:39:14.136Z</lastmod>
61+
<lastmod>2025-09-29T09:13:10.844Z</lastmod>
6262
</url>
6363
<url>
6464
<loc>https://turinglang.org/docs/developers/inference/abstractmcmc-turing/index.html</loc>
65-
<lastmod>2025-09-26T16:39:14.137Z</lastmod>
65+
<lastmod>2025-09-29T09:13:10.844Z</lastmod>
6666
</url>
6767
<url>
6868
<loc>https://turinglang.org/docs/developers/inference/implementing-samplers/index.html</loc>
69-
<lastmod>2025-09-26T16:39:14.137Z</lastmod>
69+
<lastmod>2025-09-29T09:13:10.844Z</lastmod>
7070
</url>
7171
<url>
7272
<loc>https://turinglang.org/docs/usage/performance-tips/index.html</loc>
73-
<lastmod>2025-09-26T16:39:14.144Z</lastmod>
73+
<lastmod>2025-09-29T09:13:10.851Z</lastmod>
7474
</url>
7575
<url>
7676
<loc>https://turinglang.org/docs/usage/custom-distribution/index.html</loc>
77-
<lastmod>2025-09-26T16:39:14.143Z</lastmod>
77+
<lastmod>2025-09-29T09:13:10.851Z</lastmod>
7878
</url>
7979
<url>
8080
<loc>https://turinglang.org/docs/usage/mode-estimation/index.html</loc>
81-
<lastmod>2025-09-26T16:39:14.144Z</lastmod>
81+
<lastmod>2025-09-29T09:13:10.851Z</lastmod>
8282
</url>
8383
<url>
8484
<loc>https://turinglang.org/docs/usage/submodels/index.html</loc>
85-
<lastmod>2025-09-26T16:39:14.144Z</lastmod>
85+
<lastmod>2025-09-29T09:13:10.851Z</lastmod>
8686
</url>
8787
<url>
8888
<loc>https://turinglang.org/docs/usage/external-samplers/index.html</loc>
89-
<lastmod>2025-09-26T16:39:14.144Z</lastmod>
89+
<lastmod>2025-09-29T09:13:10.851Z</lastmod>
9090
</url>
9191
<url>
9292
<loc>https://turinglang.org/docs/usage/sampler-visualisation/index.html</loc>
93-
<lastmod>2025-09-26T16:39:14.144Z</lastmod>
93+
<lastmod>2025-09-29T09:13:10.851Z</lastmod>
9494
</url>
9595
<url>
9696
<loc>https://turinglang.org/docs/faq/index.html</loc>
97-
<lastmod>2025-09-26T16:39:14.141Z</lastmod>
97+
<lastmod>2025-09-29T09:13:10.848Z</lastmod>
9898
</url>
9999
<url>
100100
<loc>https://turinglang.org/docs/usage/modifying-logprob/index.html</loc>
101-
<lastmod>2025-09-26T16:39:14.144Z</lastmod>
101+
<lastmod>2025-09-29T09:13:10.851Z</lastmod>
102102
</url>
103103
<url>
104104
<loc>https://turinglang.org/docs/usage/automatic-differentiation/index.html</loc>
105-
<lastmod>2025-09-26T16:39:14.143Z</lastmod>
105+
<lastmod>2025-09-29T09:13:10.851Z</lastmod>
106106
</url>
107107
<url>
108108
<loc>https://turinglang.org/docs/usage/tracking-extra-quantities/index.html</loc>
109-
<lastmod>2025-09-26T16:39:14.144Z</lastmod>
109+
<lastmod>2025-09-29T09:13:10.852Z</lastmod>
110110
</url>
111111
<url>
112112
<loc>https://turinglang.org/docs/usage/dynamichmc/index.html</loc>
113-
<lastmod>2025-09-26T16:39:14.144Z</lastmod>
113+
<lastmod>2025-09-29T09:13:10.851Z</lastmod>
114114
</url>
115115
<url>
116116
<loc>https://turinglang.org/docs/usage/troubleshooting/index.html</loc>
117-
<lastmod>2025-09-26T16:39:14.144Z</lastmod>
117+
<lastmod>2025-09-29T09:13:10.852Z</lastmod>
118118
</url>
119119
<url>
120120
<loc>https://turinglang.org/docs/usage/probability-interface/index.html</loc>
121-
<lastmod>2025-09-26T16:39:14.144Z</lastmod>
121+
<lastmod>2025-09-29T09:13:10.851Z</lastmod>
122122
</url>
123123
<url>
124124
<loc>https://turinglang.org/docs/versions.html</loc>
125-
<lastmod>2025-09-26T16:55:51.928Z</lastmod>
125+
<lastmod>2025-09-29T09:14:07.929Z</lastmod>
126126
</url>
127127
<url>
128128
<loc>https://turinglang.org/docs/developers/inference/variational-inference/index.html</loc>
129-
<lastmod>2025-09-26T16:39:14.137Z</lastmod>
129+
<lastmod>2025-09-29T09:13:10.844Z</lastmod>
130130
</url>
131131
<url>
132132
<loc>https://turinglang.org/docs/developers/inference/abstractmcmc-interface/index.html</loc>
133-
<lastmod>2025-09-26T16:39:14.136Z</lastmod>
133+
<lastmod>2025-09-29T09:13:10.844Z</lastmod>
134134
</url>
135135
<url>
136136
<loc>https://turinglang.org/docs/developers/transforms/distributions/index.html</loc>
137-
<lastmod>2025-09-26T16:39:14.137Z</lastmod>
137+
<lastmod>2025-09-29T09:13:10.845Z</lastmod>
138138
</url>
139139
<url>
140140
<loc>https://turinglang.org/docs/developers/transforms/bijectors/index.html</loc>
141-
<lastmod>2025-09-26T16:39:14.137Z</lastmod>
141+
<lastmod>2025-09-29T09:13:10.844Z</lastmod>
142142
</url>
143143
<url>
144144
<loc>https://turinglang.org/docs/developers/compiler/minituring-compiler/index.html</loc>
145-
<lastmod>2025-09-26T16:39:14.136Z</lastmod>
145+
<lastmod>2025-09-29T09:13:10.843Z</lastmod>
146146
</url>
147147
<url>
148148
<loc>https://turinglang.org/docs/developers/compiler/design-overview/index.html</loc>
149-
<lastmod>2025-09-26T16:39:14.136Z</lastmod>
149+
<lastmod>2025-09-29T09:13:10.843Z</lastmod>
150150
</url>
151151
<url>
152152
<loc>https://turinglang.org/docs/uri/initial-parameters.html</loc>
153-
<lastmod>2025-09-26T16:39:14.143Z</lastmod>
153+
<lastmod>2025-09-29T09:13:10.851Z</lastmod>
154154
</url>
155155
<url>
156156
<loc>https://turinglang.org/docs/getting-started/index.html</loc>
157-
<lastmod>2025-09-26T16:39:14.141Z</lastmod>
157+
<lastmod>2025-09-29T09:13:10.848Z</lastmod>
158158
</url>
159159
<url>
160160
<loc>https://turinglang.org/docs/tutorials/hidden-markov-models/index.html</loc>
161-
<lastmod>2025-09-26T16:39:14.143Z</lastmod>
161+
<lastmod>2025-09-29T09:13:10.850Z</lastmod>
162162
</url>
163163
<url>
164164
<loc>https://turinglang.org/docs/tutorials/gaussian-processes-introduction/index.html</loc>
165-
<lastmod>2025-09-26T16:39:14.142Z</lastmod>
165+
<lastmod>2025-09-29T09:13:10.850Z</lastmod>
166166
</url>
167167
<url>
168168
<loc>https://turinglang.org/docs/tutorials/probabilistic-pca/index.html</loc>
169-
<lastmod>2025-09-26T16:39:14.143Z</lastmod>
169+
<lastmod>2025-09-29T09:13:10.850Z</lastmod>
170170
</url>
171171
<url>
172172
<loc>https://turinglang.org/docs/tutorials/gaussian-process-latent-variable-models/index.html</loc>
173-
<lastmod>2025-09-26T16:39:14.142Z</lastmod>
173+
<lastmod>2025-09-29T09:13:10.850Z</lastmod>
174174
</url>
175175
<url>
176176
<loc>https://turinglang.org/docs/tutorials/bayesian-linear-regression/index.html</loc>
177-
<lastmod>2025-09-26T16:39:14.142Z</lastmod>
177+
<lastmod>2025-09-29T09:13:10.849Z</lastmod>
178178
</url>
179179
<url>
180180
<loc>https://turinglang.org/docs/tutorials/coin-flipping/index.html</loc>
181-
<lastmod>2025-09-26T16:39:14.142Z</lastmod>
181+
<lastmod>2025-09-29T09:13:10.849Z</lastmod>
182182
</url>
183183
<url>
184184
<loc>https://turinglang.org/docs/tutorials/bayesian-differential-equations/index.html</loc>
185-
<lastmod>2025-09-26T16:39:14.142Z</lastmod>
185+
<lastmod>2025-09-29T09:13:10.849Z</lastmod>
186186
</url>
187187
<url>
188188
<loc>https://turinglang.org/docs/core-functionality/index.html</loc>
189-
<lastmod>2025-09-26T16:39:14.136Z</lastmod>
189+
<lastmod>2025-09-29T09:13:10.843Z</lastmod>
190190
</url>
191191
</urlset>

tutorials/bayesian-logistic-regression/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,8 +1007,8 @@ <h2 class="anchored" data-anchor-id="sampling">Sampling</h2>
10071007
Iterations = 751:1:2250
10081008
Number of chains = 3
10091009
Samples per chain = 1500
1010-
Wall duration = 14.26 seconds
1011-
Compute duration = 10.88 seconds
1010+
Wall duration = 14.58 seconds
1011+
Compute duration = 11.11 seconds
10121012
parameters = intercept, student, balance, income
10131013
internals = n_steps, is_accept, acceptance_rate, log_density, hamiltonian_energy, hamiltonian_energy_error, max_hamiltonian_energy_error, tree_depth, numerical_error, step_size, nom_step_size, lp, logprior, loglikelihood
10141014

@@ -1027,7 +1027,7 @@ <h2 class="anchored" data-anchor-id="sampling">Sampling</h2>
10271027
</div>
10281028
<div id="callout-1" class="callout-1-contents callout-collapse collapse">
10291029
<div class="callout-body-container callout-body">
1030-
<p>The <code>sample()</code> call above assumes that you have at least <code>nchains</code> threads available in your Julia instance. If you do not, the multiple chains will run sequentially, and you may notice a warning. For more information, see <a href="https://turinglang.org/dev/docs/using-turing/guide/#sampling-multiple-chains">the Turing documentation on sampling multiple chains.</a></p>
1030+
<p>The <code>sample()</code> call above assumes that you have at least <code>nchains</code> threads available in your Julia instance. If you do not, the multiple chains will run sequentially, and you may notice a warning. For more information, see <a href="../../core-functionality#sampling-multiple-chains">the Turing documentation on sampling multiple chains.</a></p>
10311031
</div>
10321032
</div>
10331033
</div>

tutorials/bayesian-poisson-regression/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,8 +1007,8 @@ <h1>Sampling from the posterior</h1>
10071007
Iterations = 1:1:2500
10081008
Number of chains = 4
10091009
Samples per chain = 2500
1010-
Wall duration = 20.85 seconds
1011-
Compute duration = 17.45 seconds
1010+
Wall duration = 21.64 seconds
1011+
Compute duration = 18.04 seconds
10121012
parameters = b0, b1, b2, b3
10131013
internals = n_steps, is_accept, acceptance_rate, log_density, hamiltonian_energy, hamiltonian_energy_error, max_hamiltonian_energy_error, tree_depth, numerical_error, step_size, nom_step_size, lp, logprior, loglikelihood
10141014

@@ -1027,7 +1027,7 @@ <h1>Sampling from the posterior</h1>
10271027
</div>
10281028
<div id="callout-1" class="callout-1-contents callout-collapse collapse">
10291029
<div class="callout-body-container callout-body">
1030-
<p>The <code>sample()</code> call above assumes that you have at least <code>nchains</code> threads available in your Julia instance. If you do not, the multiple chains will run sequentially, and you may notice a warning. For more information, see <a href="https://turinglang.org/dev/docs/using-turing/guide/#sampling-multiple-chains">the Turing documentation on sampling multiple chains.</a></p>
1030+
<p>The <code>sample()</code> call above assumes that you have at least <code>nchains</code> threads available in your Julia instance. If you do not, the multiple chains will run sequentially, and you may notice a warning. For more information, see <a href="../../core-functionality#sampling-multiple-chains">the Turing documentation on sampling multiple chains.</a></p>
10311031
</div>
10321032
</div>
10331033
</div>
@@ -1102,8 +1102,8 @@ <h1>Removing the Warmup Samples</h1>
11021102
Iterations = 201:1:2500
11031103
Number of chains = 4
11041104
Samples per chain = 2300
1105-
Wall duration = 20.85 seconds
1106-
Compute duration = 17.45 seconds
1105+
Wall duration = 21.64 seconds
1106+
Compute duration = 18.04 seconds
11071107
parameters = b0, b1, b2, b3
11081108
internals = n_steps, is_accept, acceptance_rate, log_density, hamiltonian_energy, hamiltonian_energy_error, max_hamiltonian_energy_error, tree_depth, numerical_error, step_size, nom_step_size, lp, logprior, loglikelihood
11091109

0 commit comments

Comments
 (0)