@@ -810,7 +810,7 @@ <h2 class="anchored" data-anchor-id="the-outputs-of-a-model">The outputs of a mo
810810</ div >
811811</ div >
812812< div class ="cell-output cell-output-display " data-execution_count ="1 ">
813- < pre > < code > (xplus1 = 0.6272477661284759 ,)</ code > </ pre >
813+ < pre > < code > (xplus1 = 1.7720022290129784 ,)</ code > </ pre >
814814</ div >
815815</ div >
816816< p > and the latent variables using < code > rand()</ code > :</ p >
@@ -824,7 +824,7 @@ <h2 class="anchored" data-anchor-id="the-outputs-of-a-model">The outputs of a mo
824824</ div >
825825< div class ="cell-output cell-output-display " data-execution_count ="1 ">
826826< pre > < code > Dict{VarName, Any} with 1 entry:
827- x => -1.11997 </ code > </ pre >
827+ x => 1.30805 </ code > </ pre >
828828</ div >
829829</ div >
830830< div class ="callout callout-style-default callout-note callout-titled ">
@@ -856,14 +856,14 @@ <h2 class="anchored" data-anchor-id="passing-latent-values-into-a-model">Passing
856856</ div >
857857</ div >
858858< div class ="cell-output cell-output-display " data-execution_count ="1 ">
859- < pre > < code > -1.5461046679563166 </ code > </ pre >
859+ < pre > < code > -1.7744343720211213 </ code > </ pre >
860860</ div >
861861</ div >
862862< p > One can check this against the expected log prior:</ p >
863863< div id ="10 " class ="cell " data-execution_count ="1 ">
864864< div class ="code-copy-outer-scaffold "> < div class ="sourceCode cell-code " id ="cb9 "> < pre class ="sourceCode julia code-with-copy "> < code class ="sourceCode julia "> < span id ="cb9-1 "> < a href ="#cb9-1 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="fu "> logpdf</ span > (< span class ="fu "> Normal</ span > (), latents[< span class ="pp "> @varname</ span > (x)])</ span > </ code > </ pre > </ div > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ div >
865865< div class ="cell-output cell-output-display " data-execution_count ="1 ">
866- < pre > < code > -1.5461046679563166 </ code > </ pre >
866+ < pre > < code > -1.7744343720211213 </ code > </ pre >
867867</ div >
868868</ div >
869869< p > Likewise, you can evaluate the return value of the model given the latent variables:</ p >
@@ -876,7 +876,7 @@ <h2 class="anchored" data-anchor-id="passing-latent-values-into-a-model">Passing
876876</ div >
877877</ div >
878878< div class ="cell-output cell-output-display " data-execution_count ="1 ">
879- < pre > < code > (xplus1 = -0.11996976276294524 ,)</ code > </ pre >
879+ < pre > < code > (xplus1 = 2.3080488055240513 ,)</ code > </ pre >
880880</ div >
881881</ div >
882882</ section >
@@ -895,21 +895,21 @@ <h2 class="anchored" data-anchor-id="varinfo">VarInfo</h2>
895895</ div >
896896</ div >
897897< div class ="cell-output cell-output-display " data-execution_count ="1 ">
898- < pre > < code > VarInfo{@NamedTuple{x::DynamicPPL.Metadata{Dict{VarName{:x, typeof(identity)}, Int64}, Vector{Normal{Float64}}, Vector{VarName{:x, typeof(identity)}}, Vector{Float64}}}, DynamicPPL.AccumulatorTuple{3, @NamedTuple{LogPrior::LogPriorAccumulator{Float64}, LogJacobian::LogJacobianAccumulator{Float64}, LogLikelihood::LogLikelihoodAccumulator{Float64}}}}((x = DynamicPPL.Metadata{Dict{VarName{:x, typeof(identity)}, Int64}, Vector{Normal{Float64}}, Vector{VarName{:x, typeof(identity)}}, Vector{Float64}}(Dict(x => 1), [x], UnitRange{Int64}[1:1], [-0.12582201327469894], Normal{Float64}[Distributions.Normal{Float64}(μ=0.0, σ=1.0)], Bool[0]),), DynamicPPL.AccumulatorTuple{3, @NamedTuple{LogPrior::LogPriorAccumulator{Float64}, LogJacobian::LogJacobianAccumulator{Float64}, LogLikelihood::LogLikelihoodAccumulator{Float64}}}((LogPrior = DynamicPPL.LogPriorAccumulator(-0.926854122716922), LogJacobian = DynamicPPL.LogJacobianAccumulator(0.0), LogLikelihood = DynamicPPL.LogLikelihoodAccumulator(-3.17849814926632))))</ code > </ pre >
898+ < pre > < code > VarInfo{@NamedTuple{x::DynamicPPL.Metadata{Dict{VarName{:x, typeof(identity)}, Int64}, Vector{Normal{Float64}}, Vector{VarName{:x, typeof(identity)}}, Vector{Float64}}}, DynamicPPL.AccumulatorTuple{3, @NamedTuple{LogPrior::LogPriorAccumulator{Float64}, LogJacobian::LogJacobianAccumulator{Float64}, LogLikelihood::LogLikelihoodAccumulator{Float64}}}}((x = DynamicPPL.Metadata{Dict{VarName{:x, typeof(identity)}, Int64}, Vector{Normal{Float64}}, Vector{VarName{:x, typeof(identity)}}, Vector{Float64}}(Dict(x => 1), [x], UnitRange{Int64}[1:1], [-0.8746384836384447], Normal{Float64}[Distributions.Normal{Float64}(μ=0.0, σ=1.0)], Bool[0]),), DynamicPPL.AccumulatorTuple{3, @NamedTuple{LogPrior::LogPriorAccumulator{Float64}, LogJacobian::LogJacobianAccumulator{Float64}, LogLikelihood::LogLikelihoodAccumulator{Float64}}}((LogPrior = DynamicPPL.LogPriorAccumulator(-1.3014347717353516), LogJacobian = DynamicPPL.LogJacobianAccumulator(0.0), LogLikelihood = DynamicPPL.LogLikelihoodAccumulator(-5.050711739012242))))</ code > </ pre >
899899</ div >
900900</ div >
901901< p > (Don’t worry about the printout of the VarInfo object: we won’t need to understand its internal structure.) We can index into a VarInfo:</ p >
902902< div id ="16 " class ="cell " data-execution_count ="1 ">
903903< div class ="code-copy-outer-scaffold "> < div class ="sourceCode cell-code " id ="cb15 "> < pre class ="sourceCode julia code-with-copy "> < code class ="sourceCode julia "> < span id ="cb15-1 "> < a href ="#cb15-1 " aria-hidden ="true " tabindex ="-1 "> </ a > v[< span class ="pp "> @varname</ span > (x)]</ span > </ code > </ pre > </ div > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ div >
904904< div class ="cell-output cell-output-display " data-execution_count ="1 ">
905- < pre > < code > -0.12582201327469894 </ code > </ pre >
905+ < pre > < code > -0.8746384836384447 </ code > </ pre >
906906</ div >
907907</ div >
908908< p > To access the values of log-probabilities, DynamicPPL provides the < code > getlogprior</ code > , < code > getloglikelihood</ code > , and < code > getlogjoint</ code > functions:</ p >
909909< div id ="18 " class ="cell " data-execution_count ="1 ">
910910< div class ="code-copy-outer-scaffold "> < div class ="sourceCode cell-code " id ="cb17 "> < pre class ="sourceCode julia code-with-copy "> < code class ="sourceCode julia "> < span id ="cb17-1 "> < a href ="#cb17-1 " aria-hidden ="true " tabindex ="-1 "> </ a > DynamicPPL.< span class ="fu "> getlogprior</ span > (v)</ span > </ code > </ pre > </ div > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ div >
911911< div class ="cell-output cell-output-display " data-execution_count ="1 ">
912- < pre > < code > -0.926854122716922 </ code > </ pre >
912+ < pre > < code > -1.3014347717353516 </ code > </ pre >
913913</ div >
914914</ div >
915915< p > What about the return value? Well, the VarInfo does not store this directly: recall that < code > evaluate!!</ code > gives us back the return value separately from the updated VarInfo. So, let’s try calling it to see what happens. The default behaviour of < code > evaluate!!</ code > is to use the parameter values stored in the VarInfo during model execution. That is, when it sees < code > x ~ Normal()</ code > , it will use the value of < code > x</ code > stored in < code > v</ code > . We will see later how to change this behaviour.</ p >
@@ -922,7 +922,7 @@ <h2 class="anchored" data-anchor-id="varinfo">VarInfo</h2>
922922</ div >
923923</ div >
924924< div class ="cell-output cell-output-display " data-execution_count ="1 ">
925- < pre > < code > ((xplus1 = 0.874177986725301,), VarInfo{@NamedTuple{x::DynamicPPL.Metadata{Dict{VarName{:x, typeof(identity)}, Int64}, Vector{Normal{Float64}}, Vector{VarName{:x, typeof(identity)}}, Vector{Float64}}}, DynamicPPL.AccumulatorTuple{3, @NamedTuple{LogPrior::LogPriorAccumulator{Float64}, LogJacobian::LogJacobianAccumulator{Float64}, LogLikelihood::LogLikelihoodAccumulator{Float64}}}}((x = DynamicPPL.Metadata{Dict{VarName{:x, typeof(identity)}, Int64}, Vector{Normal{Float64}}, Vector{VarName{:x, typeof(identity)}}, Vector{Float64}}(Dict(x => 1), [x], UnitRange{Int64}[1:1], [-0.12582201327469894], Normal{Float64}[Distributions.Normal{Float64}(μ=0.0, σ=1.0)], Bool[0]),), DynamicPPL.AccumulatorTuple{3, @NamedTuple{LogPrior::LogPriorAccumulator{Float64}, LogJacobian::LogJacobianAccumulator{Float64}, LogLikelihood::LogLikelihoodAccumulator{Float64}}}((LogPrior = DynamicPPL.LogPriorAccumulator(-0.926854122716922), LogJacobian = DynamicPPL.LogJacobianAccumulator(0.0), LogLikelihood = DynamicPPL.LogLikelihoodAccumulator(-3.17849814926632)))))</ code > </ pre >
925+ < pre > < code > ((xplus1 = 0.12536151636155535,), VarInfo{@NamedTuple{x::DynamicPPL.Metadata{Dict{VarName{:x, typeof(identity)}, Int64}, Vector{Normal{Float64}}, Vector{VarName{:x, typeof(identity)}}, Vector{Float64}}}, DynamicPPL.AccumulatorTuple{3, @NamedTuple{LogPrior::LogPriorAccumulator{Float64}, LogJacobian::LogJacobianAccumulator{Float64}, LogLikelihood::LogLikelihoodAccumulator{Float64}}}}((x = DynamicPPL.Metadata{Dict{VarName{:x, typeof(identity)}, Int64}, Vector{Normal{Float64}}, Vector{VarName{:x, typeof(identity)}}, Vector{Float64}}(Dict(x => 1), [x], UnitRange{Int64}[1:1], [-0.8746384836384447], Normal{Float64}[Distributions.Normal{Float64}(μ=0.0, σ=1.0)], Bool[0]),), DynamicPPL.AccumulatorTuple{3, @NamedTuple{LogPrior::LogPriorAccumulator{Float64}, LogJacobian::LogJacobianAccumulator{Float64}, LogLikelihood::LogLikelihoodAccumulator{Float64}}}((LogPrior = DynamicPPL.LogPriorAccumulator(-1.3014347717353516), LogJacobian = DynamicPPL.LogJacobianAccumulator(0.0), LogLikelihood = DynamicPPL.LogLikelihoodAccumulator(-5.050711739012242)))))</ code > </ pre >
926926</ div >
927927</ div >
928928< p > So here in a single call we have obtained both the return value and an updated VarInfo < code > vout</ code > , from which we can again extract log probabilities and variable values. We can see from this that the value of < code > vout[@varname(x)]</ code > is the same as < code > v[@varname(x)]</ code > :</ p >
@@ -949,7 +949,7 @@ <h2 class="anchored" data-anchor-id="specifying-parameter-values">Specifying par
949949</ div >
950950</ div >
951951< div class ="cell-output cell-output-display " data-execution_count ="1 ">
952- < pre > < code > ((xplus1 = -0.3598335031273716,), VarInfo{@NamedTuple{x::DynamicPPL.Metadata{Dict{VarName{:x, typeof(identity)}, Int64}, Vector{Normal{Float64}}, Vector{VarName{:x, typeof(identity)}}, Vector{Float64}}}, DynamicPPL.AccumulatorTuple{3, @NamedTuple{LogPrior::LogPriorAccumulator{Float64}, LogJacobian::LogJacobianAccumulator{Float64}, LogLikelihood::LogLikelihoodAccumulator{Float64}}}}((x = DynamicPPL.Metadata{Dict{VarName{:x, typeof(identity)}, Int64}, Vector{Normal{Float64}}, Vector{VarName{:x, typeof(identity)}}, Vector{Float64}}(Dict(x => 1), [x], UnitRange{Int64}[1:1], [-1.3598335031273716], Normal{Float64}[Distributions.Normal{Float64}(μ=0.0, σ=1.0)], Bool[0]),), DynamicPPL.AccumulatorTuple{3, @NamedTuple{LogPrior::LogPriorAccumulator{Float64}, LogJacobian::LogJacobianAccumulator{Float64}, LogLikelihood::LogLikelihoodAccumulator{Float64}}}((LogPrior = DynamicPPL.LogPriorAccumulator(-1.8435121113185025), LogJacobian = DynamicPPL.LogJacobianAccumulator(0.0), LogLikelihood = DynamicPPL.LogLikelihoodAccumulator(-6.563179117573247)))))</ code > </ pre >
952+ < pre > < code > ((xplus1 = 0.48252521121159364,), VarInfo{@NamedTuple{x::DynamicPPL.Metadata{Dict{VarName{:x, typeof(identity)}, Int64}, Vector{Normal{Float64}}, Vector{VarName{:x, typeof(identity)}}, Vector{Float64}}}, DynamicPPL.AccumulatorTuple{3, @NamedTuple{LogPrior::LogPriorAccumulator{Float64}, LogJacobian::LogJacobianAccumulator{Float64}, LogLikelihood::LogLikelihoodAccumulator{Float64}}}}((x = DynamicPPL.Metadata{Dict{VarName{:x, typeof(identity)}, Int64}, Vector{Normal{Float64}}, Vector{VarName{:x, typeof(identity)}}, Vector{Float64}}(Dict(x => 1), [x], UnitRange{Int64}[1:1], [-0.5174747887884064], Normal{Float64}[Distributions.Normal{Float64}(μ=0.0, σ=1.0)], Bool[0]),), DynamicPPL.AccumulatorTuple{3, @NamedTuple{LogPrior::LogPriorAccumulator{Float64}, LogJacobian::LogJacobianAccumulator{Float64}, LogLikelihood::LogLikelihoodAccumulator{Float64}}}((LogPrior = DynamicPPL.LogPriorAccumulator(-1.0528286117204757), LogJacobian = DynamicPPL.LogJacobianAccumulator(0.0), LogLikelihood = DynamicPPL.LogLikelihoodAccumulator(-4.087778189297288)))))</ code > </ pre >
953953</ div >
954954</ div >
955955< p > This updates < code > v_new</ code > with the new values that were sampled, and also means that log probabilities are computed using these new values.</ p >
@@ -1021,15 +1021,15 @@ <h2 class="anchored" data-anchor-id="parameters-in-the-form-of-vectors">Paramete
10211021< span id ="cb29-5 "> < a href ="#cb29-5 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="fu "> median</ span > (< span class ="pp "> @be</ span > DynamicPPL.< span class ="fu "> evaluate!!</ span > (model, v_new))</ span >
10221022< span id ="cb29-6 "> < a href ="#cb29-6 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="cf "> end</ span > </ span > </ code > </ pre > </ div > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ div >
10231023< div class ="cell-output cell-output-display " data-execution_count ="1 ">
1024- < pre > < code > 336.794 ns (7 allocs: 288 bytes)</ code > </ pre >
1024+ < pre > < code > 374.410 ns (7 allocs: 288 bytes)</ code > </ pre >
10251025</ div >
10261026</ div >
10271027< div id ="32 " class ="cell " data-execution_count ="1 ">
10281028< div class ="code-copy-outer-scaffold "> < div class ="sourceCode cell-code " id ="cb31 "> < pre class ="sourceCode julia code-with-copy "> < code class ="sourceCode julia "> < span id ="cb31-1 "> < a href ="#cb31-1 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="fu "> with_logger</ span > (< span class ="fu "> ConsoleLogger</ span > (< span class ="cn "> stderr</ span > , < span class ="bu "> Logging</ span > .Warn)) < span class ="cf "> do</ span > </ span >
10291029< span id ="cb31-2 "> < a href ="#cb31-2 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="fu "> median</ span > (< span class ="pp "> @be</ span > DynamicPPL.< span class ="fu "> init!!</ span > (model, v_new, < span class ="fu "> InitFromParams</ span > (< span class ="fu "> Dict</ span > (< span class ="pp "> @varname</ span > (x) < span class ="op "> =></ span > < span class ="fl "> 3.0</ span > ))))</ span >
10301030< span id ="cb31-3 "> < a href ="#cb31-3 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="cf "> end</ span > </ span > </ code > </ pre > </ div > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ div >
10311031< div class ="cell-output cell-output-display " data-execution_count ="1 ">
1032- < pre > < code > 441.864 ns (12 allocs: 624 bytes)</ code > </ pre >
1032+ < pre > < code > 498.559 ns (12 allocs: 624 bytes)</ code > </ pre >
10331033</ div >
10341034</ div >
10351035< p > When evaluating models in tight loops, as is often the case in inference algorithms, this overhead can be quite unwanted. DynamicPPL provides a rather dangerous, but powerful, way to get around this, which is the < code > DynamicPPL.unflatten</ code > function. < code > unflatten</ code > allows you to directly modify the internal storage of a VarInfo, without having to go through < code > init!!</ code > and model evaluation. Its input is a vector of parameters.</ p >
@@ -1054,7 +1054,8 @@ <h2 class="anchored" data-anchor-id="parameters-in-the-form-of-vectors">Paramete
10541054< pre > < code > ((xplus1 = 8.0,), VarInfo{@NamedTuple{x::DynamicPPL.Metadata{Dict{VarName{:x, typeof(identity)}, Int64}, Vector{Normal{Float64}}, Vector{VarName{:x, typeof(identity)}}, Vector{Float64}}}, DynamicPPL.AccumulatorTuple{3, @NamedTuple{LogPrior::LogPriorAccumulator{Float64}, LogJacobian::LogJacobianAccumulator{Float64}, LogLikelihood::LogLikelihoodAccumulator{Float64}}}}((x = DynamicPPL.Metadata{Dict{VarName{:x, typeof(identity)}, Int64}, Vector{Normal{Float64}}, Vector{VarName{:x, typeof(identity)}}, Vector{Float64}}(Dict(x => 1), [x], UnitRange{Int64}[1:1], [7.0], Normal{Float64}[Distributions.Normal{Float64}(μ=0.0, σ=1.0)], Bool[0]),), DynamicPPL.AccumulatorTuple{3, @NamedTuple{LogPrior::LogPriorAccumulator{Float64}, LogJacobian::LogJacobianAccumulator{Float64}, LogLikelihood::LogLikelihoodAccumulator{Float64}}}((LogPrior = DynamicPPL.LogPriorAccumulator(-25.418938533204674), LogJacobian = DynamicPPL.LogJacobianAccumulator(0.0), LogLikelihood = DynamicPPL.LogLikelihoodAccumulator(-13.418938533204672)))))</ code > </ pre >
10551055</ div >
10561056</ div >
1057- < p > < strong > There are several reasons why this function is dangerous. If you use it, you must pay close attention to correctness:</ strong > </ p >
1057+ < p > Even the combination of < code > unflatten</ code > and < code > evaluate!!</ code > tends to be faster than a single call to < code > init!!</ code > , especially for larger models.</ p >
1058+ < p > < strong > However, there are several reasons why this function is dangerous. If you use it, you must pay close attention to correctness:</ strong > </ p >
10581059< ol type ="1 ">
10591060< li > < p > For models with multiple variables, the order in which these variables occur in the vector is not obvious. The short answer is that it depends on the order in which the variables are added to the VarInfo during its initialisation. If you have models where the order of variables can vary from one execution to another, then < code > unflatten</ code > can easily lead to incorrect results.</ p > </ li >
10601061< li > < p > The meaning of the values passed in will generally depend on whether the VarInfo is linked or not (see the < a href ="?meta:developers/transforms/dynamicppl "> Variable Transformations page</ a > for more information about linked VarInfos). You must make sure that the values passed in are consistent with the link status of the VarInfo. In contrast, < code > InitFromParams</ code > always uses unlinked values.</ p > </ li >
@@ -1163,7 +1164,7 @@ <h2 class="anchored" data-anchor-id="advanced-typed-and-untyped-varinfo">Advance
11631164 [6] < span class ="ansi-bold "> getindex</ span > < span class ="ansi-bold "> (</ span > < span class ="ansi-bright-black-fg "> vi</ span > ::VarInfo< span class ="ansi-bright-black-fg "> {DynamicPPL.Metadata{Dict{VarName, Int64}, Vector{Distribution}, Vector{VarName}, Vector{Real}}, DynamicPPL.AccumulatorTuple{3, @NamedTuple{LogPrior::LogPriorAccumulator{Float64}, LogJacobian::LogJacobianAccumulator{Float64}, LogLikelihood::LogLikelihoodAccumulator{Float64}}}}</ span > , < span class ="ansi-bright-black-fg "> vn</ span > ::VarName< span class ="ansi-bright-black-fg "> {:x, typeof(identity)}</ span > < span class ="ansi-bold "> )</ span >
11641165< span class ="ansi-bright-black-fg "> @</ span > < span class ="ansi-magenta-fg "> DynamicPPL</ span > < span class ="ansi-bright-black-fg "> ~/.julia/packages/DynamicPPL/kpBde/src/</ span > < span style ="text-decoration:underline " class ="ansi-bright-black-fg "> varinfo.jl:1491</ span >
11651166 [7] top-level scope
1166- < span class ="ansi-bright-black-fg "> @</ span > < span class ="ansi-bright-black-fg "> ~/work/docs/docs/developers/models/varinfo-overview/</ span > < span style ="text-decoration:underline " class ="ansi-bright-black-fg "> index.qmd:321 </ span > </ pre >
1167+ < span class ="ansi-bright-black-fg "> @</ span > < span class ="ansi-bright-black-fg "> ~/work/docs/docs/developers/models/varinfo-overview/</ span > < span style ="text-decoration:underline " class ="ansi-bright-black-fg "> index.qmd:323 </ span > </ pre >
11671168</ div >
11681169</ div >
11691170</ div >
@@ -1250,15 +1251,15 @@ <h2 class="anchored" data-anchor-id="advanced-typed-and-untyped-varinfo">Advance
12501251< span id ="cb55-2 "> < a href ="#cb55-2 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="fu "> median</ span > (< span class ="pp "> @be</ span > DynamicPPL.< span class ="fu "> evaluate!!</ span > (model, v_filled_untyped))</ span >
12511252< span id ="cb55-3 "> < a href ="#cb55-3 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="cf "> end</ span > </ span > </ code > </ pre > </ div > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ div >
12521253< div class ="cell-output cell-output-display " data-execution_count ="1 ">
1253- < pre > < code > 2.091 μs (32 allocs: 1.328 KiB)</ code > </ pre >
1254+ < pre > < code > 2.100 μs (32 allocs: 1.328 KiB)</ code > </ pre >
12541255</ div >
12551256</ div >
12561257< div id ="58 " class ="cell " data-execution_count ="1 ">
12571258< div class ="code-copy-outer-scaffold "> < div class ="sourceCode cell-code " id ="cb57 "> < pre class ="sourceCode julia code-with-copy "> < code class ="sourceCode julia "> < span id ="cb57-1 "> < a href ="#cb57-1 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="fu "> with_logger</ span > (< span class ="fu "> ConsoleLogger</ span > (< span class ="cn "> stderr</ span > , < span class ="bu "> Logging</ span > .Warn)) < span class ="cf "> do</ span > </ span >
12581259< span id ="cb57-2 "> < a href ="#cb57-2 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="fu "> median</ span > (< span class ="pp "> @be</ span > DynamicPPL.< span class ="fu "> evaluate!!</ span > (model, v_filled_typed))</ span >
12591260< span id ="cb57-3 "> < a href ="#cb57-3 " aria-hidden ="true " tabindex ="-1 "> </ a > < span class ="cf "> end</ span > </ span > </ code > </ pre > </ div > < button title ="Copy to Clipboard " class ="code-copy-button "> < i class ="bi "> </ i > </ button > </ div >
12601261< div class ="cell-output cell-output-display " data-execution_count ="1 ">
1261- < pre > < code > 335.930 ns (7 allocs: 288 bytes)</ code > </ pre >
1262+ < pre > < code > 375.321 ns (7 allocs: 288 bytes)</ code > </ pre >
12621263</ div >
12631264</ div >
12641265
0 commit comments