Skip to content

Commit 34b5249

Browse files
committed
Deploy preview for PR 636
1 parent bf48bd7 commit 34b5249

File tree

48 files changed

+445
-415
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+445
-415
lines changed

pr-previews/636/404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,7 @@ <h5>Supported by leading researchers</h5>
11621162

11631163
</div>
11641164
<div class="footer-bottom">
1165-
<p>Turing is created by <a href="https://mlg.eng.cam.ac.uk/hong/" target="_blank" rel="noopener">Hong Ge</a>, and maintained by the core <a href="https://turinglang.org/team/" target="_blank" rel="noopener">team</a> of developers and <a href="https://github.com/TuringLang/Turing.jl/graphs/contributors" target="_blank" rel="noopener">contributors</a>.<br>© 2025 The Turing Project Contributors. <a href="https://github.com/TuringLang/Turing.jl/blob/master/LICENCE" target="_blank" rel="noopener">MIT License</a>.</p>
1165+
<p>Turing.jl was created by <a href="https://mlg.eng.cam.ac.uk/hong/" target="_blank" rel="noopener">Hong Ge</a>, and maintained by the core <a href="https://turinglang.org/team/" target="_blank" rel="noopener">team</a> of developers and <a href="https://github.com/TuringLang/Turing.jl/graphs/contributors" target="_blank" rel="noopener">contributors</a>.<br>© 2025 The Turing Project Contributors. <a href="https://github.com/TuringLang/Turing.jl/blob/master/LICENCE" target="_blank" rel="noopener">MIT License</a>.</p>
11661166
<a href="https://github.com/TuringLang/docs/" target="_blank" rel="noopener" class="footer-source-link"><i class="bi bi-github"></i> Website Source</a>
11671167
</div>
11681168
</div>

pr-previews/636/core-functionality/index.html

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

pr-previews/636/developers/compiler/design-overview/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1456,7 +1456,7 @@ <h5>Supported by leading researchers</h5>
14561456

14571457
</div>
14581458
<div class="footer-bottom">
1459-
<p>Turing is created by <a href="https://mlg.eng.cam.ac.uk/hong/" target="_blank" rel="noopener">Hong Ge</a>, and maintained by the core <a href="https://turinglang.org/team/" target="_blank" rel="noopener">team</a> of developers and <a href="https://github.com/TuringLang/Turing.jl/graphs/contributors" target="_blank" rel="noopener">contributors</a>.<br>© 2025 The Turing Project Contributors. <a href="https://github.com/TuringLang/Turing.jl/blob/master/LICENCE" target="_blank" rel="noopener">MIT License</a>.</p>
1459+
<p>Turing.jl was created by <a href="https://mlg.eng.cam.ac.uk/hong/" target="_blank" rel="noopener">Hong Ge</a>, and maintained by the core <a href="https://turinglang.org/team/" target="_blank" rel="noopener">team</a> of developers and <a href="https://github.com/TuringLang/Turing.jl/graphs/contributors" target="_blank" rel="noopener">contributors</a>.<br>© 2025 The Turing Project Contributors. <a href="https://github.com/TuringLang/Turing.jl/blob/master/LICENCE" target="_blank" rel="noopener">MIT License</a>.</p>
14601460
<a href="https://github.com/TuringLang/docs/" target="_blank" rel="noopener" class="footer-source-link"><i class="bi bi-github"></i> Website Source</a>
14611461
</div>
14621462
</div>

pr-previews/636/developers/compiler/minituring-compiler/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,8 +1039,8 @@ <h1>Consider a probabilistic model defined by</h1>
10391039
Iterations = 1:1:1000000
10401040
Number of chains = 1
10411041
Samples per chain = 1000000
1042-
Wall duration = 21.97 seconds
1043-
Compute duration = 21.97 seconds
1042+
Wall duration = 22.9 seconds
1043+
Compute duration = 22.9 seconds
10441044
parameters = a, b
10451045
internals = lp, logprior, loglikelihood
10461046

@@ -1519,7 +1519,7 @@ <h5>Supported by leading researchers</h5>
15191519

15201520
</div>
15211521
<div class="footer-bottom">
1522-
<p>Turing is created by <a href="https://mlg.eng.cam.ac.uk/hong/" target="_blank" rel="noopener">Hong Ge</a>, and maintained by the core <a href="https://turinglang.org/team/" target="_blank" rel="noopener">team</a> of developers and <a href="https://github.com/TuringLang/Turing.jl/graphs/contributors" target="_blank" rel="noopener">contributors</a>.<br>© 2025 The Turing Project Contributors. <a href="https://github.com/TuringLang/Turing.jl/blob/master/LICENCE" target="_blank" rel="noopener">MIT License</a>.</p>
1522+
<p>Turing.jl was created by <a href="https://mlg.eng.cam.ac.uk/hong/" target="_blank" rel="noopener">Hong Ge</a>, and maintained by the core <a href="https://turinglang.org/team/" target="_blank" rel="noopener">team</a> of developers and <a href="https://github.com/TuringLang/Turing.jl/graphs/contributors" target="_blank" rel="noopener">contributors</a>.<br>© 2025 The Turing Project Contributors. <a href="https://github.com/TuringLang/Turing.jl/blob/master/LICENCE" target="_blank" rel="noopener">MIT License</a>.</p>
15231523
<a href="https://github.com/TuringLang/docs/" target="_blank" rel="noopener" class="footer-source-link"><i class="bi bi-github"></i> Website Source</a>
15241524
</div>
15251525
</div>

pr-previews/636/developers/compiler/minituring-contexts/index.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,19 @@ <h1 class="title">A Mini Turing Implementation II: Contexts</h1>
748748

749749

750750
<p>In the <a href="../../../developers/compiler/minituring-compiler">Mini Turing</a> tutorial we developed a miniature version of the Turing language, to illustrate its core design. A passing mention was made of contexts. In this tutorial we develop that aspect of our mini Turing language further to demonstrate how and why contexts are an important part of Turing’s design.</p>
751+
<div class="callout callout-style-default callout-important callout-titled">
752+
<div class="callout-header d-flex align-content-center">
753+
<div class="callout-icon-container">
754+
<i class="callout-icon"></i>
755+
</div>
756+
<div class="callout-title-container flex-fill">
757+
Important
758+
</div>
759+
</div>
760+
<div class="callout-body-container callout-body">
751761
<p>Note: The way Turing actually uses contexts changed somewhat in releases 0.39 and 0.40. The content of this page remains relevant, the principles of how contexts operate remain the same, and concepts like leaf and parent contexts still exist. However, we’ve moved away from using contexts for quite as many things as we used to. Most importantly, whether to accumulate the log joint, log prior, or log likelihood is no longer done using different contexts. Please keep this in mind as you read this page: The principles remain, but the details have changed. We will update this page once the refactoring of internals that is happening around releases like 0.39 and 0.40 is done.</p>
762+
</div>
763+
</div>
752764
<section id="mini-turing-expanded-now-with-more-contexts" class="level1">
753765
<h1>Mini Turing expanded, now with more contexts</h1>
754766
<p>If you haven’t read <a href="../../../developers/compiler/minituring-compiler">Mini Turing</a> yet, you should do that first. We start by repeating verbatim much of the code from there. Define the type for holding values for variables:</p>
@@ -1511,7 +1523,7 @@ <h5>Supported by leading researchers</h5>
15111523

15121524
</div>
15131525
<div class="footer-bottom">
1514-
<p>Turing is created by <a href="https://mlg.eng.cam.ac.uk/hong/" target="_blank" rel="noopener">Hong Ge</a>, and maintained by the core <a href="https://turinglang.org/team/" target="_blank" rel="noopener">team</a> of developers and <a href="https://github.com/TuringLang/Turing.jl/graphs/contributors" target="_blank" rel="noopener">contributors</a>.<br>© 2025 The Turing Project Contributors. <a href="https://github.com/TuringLang/Turing.jl/blob/master/LICENCE" target="_blank" rel="noopener">MIT License</a>.</p>
1526+
<p>Turing.jl was created by <a href="https://mlg.eng.cam.ac.uk/hong/" target="_blank" rel="noopener">Hong Ge</a>, and maintained by the core <a href="https://turinglang.org/team/" target="_blank" rel="noopener">team</a> of developers and <a href="https://github.com/TuringLang/Turing.jl/graphs/contributors" target="_blank" rel="noopener">contributors</a>.<br>© 2025 The Turing Project Contributors. <a href="https://github.com/TuringLang/Turing.jl/blob/master/LICENCE" target="_blank" rel="noopener">MIT License</a>.</p>
15151527
<a href="https://github.com/TuringLang/docs/" target="_blank" rel="noopener" class="footer-source-link"><i class="bi bi-github"></i> Website Source</a>
15161528
</div>
15171529
</div>

pr-previews/636/developers/compiler/model-manual/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -810,8 +810,8 @@ <h1 class="title">Manually Defining a Model</h1>
810810
Iterations = 501:1:1500
811811
Number of chains = 1
812812
Samples per chain = 1000
813-
Wall duration = 8.23 seconds
814-
Compute duration = 8.23 seconds
813+
Wall duration = 8.6 seconds
814+
Compute duration = 8.6 seconds
815815
parameters = s², m
816816
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
817817

@@ -1289,7 +1289,7 @@ <h5>Supported by leading researchers</h5>
12891289

12901290
</div>
12911291
<div class="footer-bottom">
1292-
<p>Turing is created by <a href="https://mlg.eng.cam.ac.uk/hong/" target="_blank" rel="noopener">Hong Ge</a>, and maintained by the core <a href="https://turinglang.org/team/" target="_blank" rel="noopener">team</a> of developers and <a href="https://github.com/TuringLang/Turing.jl/graphs/contributors" target="_blank" rel="noopener">contributors</a>.<br>© 2025 The Turing Project Contributors. <a href="https://github.com/TuringLang/Turing.jl/blob/master/LICENCE" target="_blank" rel="noopener">MIT License</a>.</p>
1292+
<p>Turing.jl was created by <a href="https://mlg.eng.cam.ac.uk/hong/" target="_blank" rel="noopener">Hong Ge</a>, and maintained by the core <a href="https://turinglang.org/team/" target="_blank" rel="noopener">team</a> of developers and <a href="https://github.com/TuringLang/Turing.jl/graphs/contributors" target="_blank" rel="noopener">contributors</a>.<br>© 2025 The Turing Project Contributors. <a href="https://github.com/TuringLang/Turing.jl/blob/master/LICENCE" target="_blank" rel="noopener">MIT License</a>.</p>
12931293
<a href="https://github.com/TuringLang/docs/" target="_blank" rel="noopener" class="footer-source-link"><i class="bi bi-github"></i> Website Source</a>
12941294
</div>
12951295
</div>

pr-previews/636/developers/contexts/submodel-condition/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ <h2 class="anchored" data-anchor-id="desiderata-at-the-context-level">Desiderata
938938
inner context: ConditionContext(Dict(a.x =&gt; 1.0), DynamicPPL.PrefixContext{AbstractPPL.VarName{:a, typeof(identity)}, DynamicPPL.DefaultContext}(a, DynamicPPL.DefaultContext()))</code></pre>
939939
</div>
940940
<div class="cell-output cell-output-display" data-execution_count="1">
941-
<pre><code>1.947319570567593</code></pre>
941+
<pre><code>-0.6151001084014697</code></pre>
942942
</div>
943943
</div>
944944
<p>For the <em>inner</em> conditioning case (point (3)), the outer model is not run with any special context. The inner model will itself contain a <code>ConditionContext</code> will contain a <code>VarName</code> that is not prefixed. When we run the model, this <code>ConditionContext</code> should be then nested <em>inside</em> a <code>PrefixContext</code> to form the final evaluation context. Again, we can run the model to see this in action:</p>
@@ -949,7 +949,7 @@ <h2 class="anchored" data-anchor-id="desiderata-at-the-context-level">Desiderata
949949
inner context: DynamicPPL.PrefixContext{AbstractPPL.VarName{:a, typeof(identity)}, DynamicPPL.ConditionContext{Dict{AbstractPPL.VarName{:x, typeof(identity)}, Float64}, DynamicPPL.DefaultContext}}(a, ConditionContext(Dict(x =&gt; 1.0), DynamicPPL.DefaultContext()))</code></pre>
950950
</div>
951951
<div class="cell-output cell-output-display" data-execution_count="1">
952-
<pre><code>0.09523991983206365</code></pre>
952+
<pre><code>0.03473925777452222</code></pre>
953953
</div>
954954
</div>
955955
<p>Putting all of the information so far together, what it means is that if we have these two inner contexts (taken from above):</p>
@@ -1602,7 +1602,7 @@ <h5>Supported by leading researchers</h5>
16021602

16031603
</div>
16041604
<div class="footer-bottom">
1605-
<p>Turing is created by <a href="https://mlg.eng.cam.ac.uk/hong/" target="_blank" rel="noopener">Hong Ge</a>, and maintained by the core <a href="https://turinglang.org/team/" target="_blank" rel="noopener">team</a> of developers and <a href="https://github.com/TuringLang/Turing.jl/graphs/contributors" target="_blank" rel="noopener">contributors</a>.<br>© 2025 The Turing Project Contributors. <a href="https://github.com/TuringLang/Turing.jl/blob/master/LICENCE" target="_blank" rel="noopener">MIT License</a>.</p>
1605+
<p>Turing.jl was created by <a href="https://mlg.eng.cam.ac.uk/hong/" target="_blank" rel="noopener">Hong Ge</a>, and maintained by the core <a href="https://turinglang.org/team/" target="_blank" rel="noopener">team</a> of developers and <a href="https://github.com/TuringLang/Turing.jl/graphs/contributors" target="_blank" rel="noopener">contributors</a>.<br>© 2025 The Turing Project Contributors. <a href="https://github.com/TuringLang/Turing.jl/blob/master/LICENCE" target="_blank" rel="noopener">MIT License</a>.</p>
16061606
<a href="https://github.com/TuringLang/docs/" target="_blank" rel="noopener" class="footer-source-link"><i class="bi bi-github"></i> Website Source</a>
16071607
</div>
16081608
</div>

pr-previews/636/developers/contributing/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1332,7 +1332,7 @@ <h5>Supported by leading researchers</h5>
13321332

13331333
</div>
13341334
<div class="footer-bottom">
1335-
<p>Turing is created by <a href="https://mlg.eng.cam.ac.uk/hong/" target="_blank" rel="noopener">Hong Ge</a>, and maintained by the core <a href="https://turinglang.org/team/" target="_blank" rel="noopener">team</a> of developers and <a href="https://github.com/TuringLang/Turing.jl/graphs/contributors" target="_blank" rel="noopener">contributors</a>.<br>© 2025 The Turing Project Contributors. <a href="https://github.com/TuringLang/Turing.jl/blob/master/LICENCE" target="_blank" rel="noopener">MIT License</a>.</p>
1335+
<p>Turing.jl was created by <a href="https://mlg.eng.cam.ac.uk/hong/" target="_blank" rel="noopener">Hong Ge</a>, and maintained by the core <a href="https://turinglang.org/team/" target="_blank" rel="noopener">team</a> of developers and <a href="https://github.com/TuringLang/Turing.jl/graphs/contributors" target="_blank" rel="noopener">contributors</a>.<br>© 2025 The Turing Project Contributors. <a href="https://github.com/TuringLang/Turing.jl/blob/master/LICENCE" target="_blank" rel="noopener">MIT License</a>.</p>
13361336
<a href="https://github.com/TuringLang/docs/" target="_blank" rel="noopener" class="footer-source-link"><i class="bi bi-github"></i> Website Source</a>
13371337
</div>
13381338
</div>

pr-previews/636/developers/inference/abstractmcmc-interface/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ <h5>Supported by leading researchers</h5>
14971497

14981498
</div>
14991499
<div class="footer-bottom">
1500-
<p>Turing is created by <a href="https://mlg.eng.cam.ac.uk/hong/" target="_blank" rel="noopener">Hong Ge</a>, and maintained by the core <a href="https://turinglang.org/team/" target="_blank" rel="noopener">team</a> of developers and <a href="https://github.com/TuringLang/Turing.jl/graphs/contributors" target="_blank" rel="noopener">contributors</a>.<br>© 2025 The Turing Project Contributors. <a href="https://github.com/TuringLang/Turing.jl/blob/master/LICENCE" target="_blank" rel="noopener">MIT License</a>.</p>
1500+
<p>Turing.jl was created by <a href="https://mlg.eng.cam.ac.uk/hong/" target="_blank" rel="noopener">Hong Ge</a>, and maintained by the core <a href="https://turinglang.org/team/" target="_blank" rel="noopener">team</a> of developers and <a href="https://github.com/TuringLang/Turing.jl/graphs/contributors" target="_blank" rel="noopener">contributors</a>.<br>© 2025 The Turing Project Contributors. <a href="https://github.com/TuringLang/Turing.jl/blob/master/LICENCE" target="_blank" rel="noopener">MIT License</a>.</p>
15011501
<a href="https://github.com/TuringLang/docs/" target="_blank" rel="noopener" class="footer-source-link"><i class="bi bi-github"></i> Website Source</a>
15021502
</div>
15031503
</div>

pr-previews/636/developers/inference/abstractmcmc-turing/index.html

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

810-
Log evidence = -3.6373550901699074
810+
Log evidence = -3.7686601482022772
811811
Iterations = 1:1:1000
812812
Number of chains = 1
813813
Samples per chain = 1000
814-
Wall duration = 2.47 seconds
815-
Compute duration = 2.47 seconds
814+
Wall duration = 2.66 seconds
815+
Compute duration = 2.66 seconds
816816
parameters = s², m
817817
internals = lp, logprior, loglikelihood
818818

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

852-
Log evidence = -3.727605130296437
852+
Log evidence = -3.7107660819885018
853853
Iterations = 1:1:1000
854854
Number of chains = 1
855855
Samples per chain = 1000
@@ -1625,7 +1625,7 @@ <h5>Supported by leading researchers</h5>
16251625

16261626
</div>
16271627
<div class="footer-bottom">
1628-
<p>Turing is created by <a href="https://mlg.eng.cam.ac.uk/hong/" target="_blank" rel="noopener">Hong Ge</a>, and maintained by the core <a href="https://turinglang.org/team/" target="_blank" rel="noopener">team</a> of developers and <a href="https://github.com/TuringLang/Turing.jl/graphs/contributors" target="_blank" rel="noopener">contributors</a>.<br>© 2025 The Turing Project Contributors. <a href="https://github.com/TuringLang/Turing.jl/blob/master/LICENCE" target="_blank" rel="noopener">MIT License</a>.</p>
1628+
<p>Turing.jl was created by <a href="https://mlg.eng.cam.ac.uk/hong/" target="_blank" rel="noopener">Hong Ge</a>, and maintained by the core <a href="https://turinglang.org/team/" target="_blank" rel="noopener">team</a> of developers and <a href="https://github.com/TuringLang/Turing.jl/graphs/contributors" target="_blank" rel="noopener">contributors</a>.<br>© 2025 The Turing Project Contributors. <a href="https://github.com/TuringLang/Turing.jl/blob/master/LICENCE" target="_blank" rel="noopener">MIT License</a>.</p>
16291629
<a href="https://github.com/TuringLang/docs/" target="_blank" rel="noopener" class="footer-source-link"><i class="bi bi-github"></i> Website Source</a>
16301630
</div>
16311631
</div>

0 commit comments

Comments
 (0)