Skip to content

Commit

Permalink
Added navbar and removed insert_navbar.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 5, 2024
1 parent 396428c commit ada0377
Show file tree
Hide file tree
Showing 9 changed files with 1,845 additions and 5 deletions.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
<!--This file is automatically generated by Documenter.jl-->
<meta http-equiv="refresh" content="0; url=./stable/"/>

1 change: 1 addition & 0 deletions previews/PR728/api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@
});
</script>
<!-- NAVBAR END -->

<div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.svg" alt="DynamicPPL logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../">DynamicPPL</a></span></div><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li class="is-active"><a class="tocitem" href>API</a><ul class="internal"><li><a class="tocitem" href="#Model"><span>Model</span></a></li><li><a class="tocitem" href="#Evaluation"><span>Evaluation</span></a></li><li><a class="tocitem" href="#Condition-and-decondition"><span>Condition and decondition</span></a></li><li><a class="tocitem" href="#Fixing-and-unfixing"><span>Fixing and unfixing</span></a></li><li><a class="tocitem" href="#Models-within-models"><span>Models within models</span></a></li><li><a class="tocitem" href="#Utilities"><span>Utilities</span></a></li><li><a class="tocitem" href="#Testing-Utilities"><span>Testing Utilities</span></a></li><li><a class="tocitem" href="#Debugging-Utilities"><span>Debugging Utilities</span></a></li><li><a class="tocitem" href="#Advanced"><span>Advanced</span></a></li></ul></li><li><span class="tocitem">Internals</span><ul><li><a class="tocitem" href="../internals/varinfo/">Design of <code>VarInfo</code></a></li><li><a class="tocitem" href="../internals/transformations/">Transforming variables</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>API</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>API</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://github.com/TuringLang/DynamicPPL.jl" title="View the repository on GitHub"><span class="docs-icon fa-brands"></span><span class="docs-label is-hidden-touch">GitHub</span></a><a class="docs-navbar-link" href="https://github.com/TuringLang/DynamicPPL.jl/blob/master/docs/src/api.md" title="Edit source on GitHub"><span class="docs-icon fa-solid"></span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="API"><a class="docs-heading-anchor" href="#API">API</a><a id="API-1"></a><a class="docs-heading-anchor-permalink" href="#API" title="Permalink"></a></h1><p>Part of the API of DynamicPPL is defined in the more lightweight interface package <a href="https://github.com/TuringLang/AbstractPPL.jl">AbstractPPL.jl</a> and reexported here.</p><h2 id="Model"><a class="docs-heading-anchor" href="#Model">Model</a><a id="Model-1"></a><a class="docs-heading-anchor-permalink" href="#Model" title="Permalink"></a></h2><h3 id="Macros"><a class="docs-heading-anchor" href="#Macros">Macros</a><a id="Macros-1"></a><a class="docs-heading-anchor-permalink" href="#Macros" title="Permalink"></a></h3><p>A core component of DynamicPPL is the <a href="#DynamicPPL.@model"><code>@model</code></a> macro. It can be used to define probabilistic models in an intuitive way by specifying random variables and their distributions with <code>~</code> statements. These statements are rewritten by <code>@model</code> as calls of <a href="#model_internal">internal functions</a> for sampling the variables and computing their log densities.</p><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="DynamicPPL.@model" href="#DynamicPPL.@model"><code>DynamicPPL.@model</code></a><span class="docstring-category">Macro</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">@model(expr[, warn = false])</code></pre><p>Macro to specify a probabilistic model.</p><p>If <code>warn</code> is <code>true</code>, a warning is displayed if internal variable names are used in the model definition.</p><p><strong>Examples</strong></p><p>Model definition:</p><pre><code class="language-julia hljs">@model function model(x, y = 42)
...
end</code></pre><p>To generate a <code>Model</code>, call <code>model(xvalue)</code> or <code>model(xvalue, yvalue)</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/TuringLang/DynamicPPL.jl/blob/ab819113cefcd4b641446c5db4dca3e2618fc6be/src/compiler.jl#L256-L275">source</a></section></article><h3 id="Type"><a class="docs-heading-anchor" href="#Type">Type</a><a id="Type-1"></a><a class="docs-heading-anchor-permalink" href="#Type" title="Permalink"></a></h3><p>A <a href="#Model"><code>Model</code></a> can be created by calling the model function, as defined by <a href="#DynamicPPL.@model"><code>@model</code></a>.</p><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="DynamicPPL.Model" href="#DynamicPPL.Model"><code>DynamicPPL.Model</code></a><span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct Model{F,argnames,defaultnames,missings,Targs,Tdefaults,Ctx&lt;:AbstactContext}
Expand Down
1 change: 1 addition & 0 deletions previews/PR728/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@
});
</script>
<!-- NAVBAR END -->

<div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href><img src="assets/logo.svg" alt="DynamicPPL logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href>DynamicPPL</a></span></div><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li class="is-active"><a class="tocitem" href>Home</a></li><li><a class="tocitem" href="api/">API</a></li><li><span class="tocitem">Internals</span><ul><li><a class="tocitem" href="internals/varinfo/">Design of <code>VarInfo</code></a></li><li><a class="tocitem" href="internals/transformations/">Transforming variables</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Home</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Home</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://github.com/TuringLang/DynamicPPL.jl" title="View the repository on GitHub"><span class="docs-icon fa-brands"></span><span class="docs-label is-hidden-touch">GitHub</span></a><a class="docs-navbar-link" href="https://github.com/TuringLang/DynamicPPL.jl/blob/master/docs/src/index.md" title="Edit source on GitHub"><span class="docs-icon fa-solid"></span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="DynamicPPL.jl"><a class="docs-heading-anchor" href="#DynamicPPL.jl">DynamicPPL.jl</a><a id="DynamicPPL.jl-1"></a><a class="docs-heading-anchor-permalink" href="#DynamicPPL.jl" title="Permalink"></a></h1><p>A domain-specific language and backend for probabilistic programming languages, used by <a href="https://github.com/TuringLang/Turing.jl">Turing.jl</a>.</p><script type="module">import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
mermaid.initialize({
startOnLoad: true,
Expand Down
1 change: 1 addition & 0 deletions previews/PR728/internals/transformations/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@
});
</script>
<!-- NAVBAR END -->

<div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img src="../../assets/logo.svg" alt="DynamicPPL logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../../">DynamicPPL</a></span></div><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><a class="tocitem" href="../../api/">API</a></li><li><span class="tocitem">Internals</span><ul><li><a class="tocitem" href="../varinfo/">Design of <code>VarInfo</code></a></li><li class="is-active"><a class="tocitem" href>Transforming variables</a><ul class="internal"><li><a class="tocitem" href="#Motivation"><span>Motivation</span></a></li><li><a class="tocitem" href="#What-do-we-need?"><span>What do we need?</span></a></li><li><a class="tocitem" href="#Working-example"><span>Working example</span></a></li><li><a class="tocitem" href="#From-internal-representation-to-model-representation"><span>From internal representation to model representation</span></a></li><li><a class="tocitem" href="#From-*unconstrained*-internal-representation-to-model-representation"><span>From <em>unconstrained</em> internal representation to model representation</span></a></li><li><a class="tocitem" href="#Why-do-we-need-both-to_internal_transform-and-to_linked_internal_transform?"><span>Why do we need both <code>to_internal_transform</code> and <code>to_linked_internal_transform</code>?</span></a></li><li><a class="tocitem" href="#Other-functionalities"><span>Other functionalities</span></a></li><li class="toplevel"><a class="tocitem" href="#Supporting-a-new-distribution"><span>Supporting a new distribution</span></a></li><li class="toplevel"><a class="tocitem" href="#TL;DR"><span>TL;DR</span></a></li></ul></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">Internals</a></li><li class="is-active"><a href>Transforming variables</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Transforming variables</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://github.com/TuringLang/DynamicPPL.jl" title="View the repository on GitHub"><span class="docs-icon fa-brands"></span><span class="docs-label is-hidden-touch">GitHub</span></a><a class="docs-navbar-link" href="https://github.com/TuringLang/DynamicPPL.jl/blob/master/docs/src/internals/transformations.md" title="Edit source on GitHub"><span class="docs-icon fa-solid"></span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="Transforming-variables"><a class="docs-heading-anchor" href="#Transforming-variables">Transforming variables</a><a id="Transforming-variables-1"></a><a class="docs-heading-anchor-permalink" href="#Transforming-variables" title="Permalink"></a></h1><h2 id="Motivation"><a class="docs-heading-anchor" href="#Motivation">Motivation</a><a id="Motivation-1"></a><a class="docs-heading-anchor-permalink" href="#Motivation" title="Permalink"></a></h2><p>In a probabilistic programming language (PPL) such as DynamicPPL.jl, one crucial functionality for enabling a large number of inference algorithms to be implemented, in particular gradient-based ones, is the ability to work with &quot;unconstrained&quot; variables.</p><p>For example, consider the following model:</p><pre><code class="language-julia hljs">@model function demo()
s ~ InverseGamma(2, 3)
return m ~ Normal(0, √s)
Expand Down
1 change: 1 addition & 0 deletions previews/PR728/internals/varinfo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@
});
</script>
<!-- NAVBAR END -->

<div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img src="../../assets/logo.svg" alt="DynamicPPL logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../../">DynamicPPL</a></span></div><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><a class="tocitem" href="../../api/">API</a></li><li><span class="tocitem">Internals</span><ul><li class="is-active"><a class="tocitem" href>Design of <code>VarInfo</code></a><ul class="internal"><li><a class="tocitem" href="#Type-stability"><span>Type-stability</span></a></li><li><a class="tocitem" href="#Efficient-storage-and-iteration"><span>Efficient storage and iteration</span></a></li><li><a class="tocitem" href="#Other-methods"><span>Other methods</span></a></li></ul></li><li><a class="tocitem" href="../transformations/">Transforming variables</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">Internals</a></li><li class="is-active"><a href>Design of <code>VarInfo</code></a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Design of <code>VarInfo</code></a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://github.com/TuringLang/DynamicPPL.jl" title="View the repository on GitHub"><span class="docs-icon fa-brands"></span><span class="docs-label is-hidden-touch">GitHub</span></a><a class="docs-navbar-link" href="https://github.com/TuringLang/DynamicPPL.jl/blob/master/docs/src/internals/varinfo.md" title="Edit source on GitHub"><span class="docs-icon fa-solid"></span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="Design-of-VarInfo"><a class="docs-heading-anchor" href="#Design-of-VarInfo">Design of <code>VarInfo</code></a><a id="Design-of-VarInfo-1"></a><a class="docs-heading-anchor-permalink" href="#Design-of-VarInfo" title="Permalink"></a></h1><p><a href="../../api/#VarInfo"><code>VarInfo</code></a> is a fairly simple structure.</p><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="DynamicPPL.VarInfo-internals-varinfo" href="#DynamicPPL.VarInfo-internals-varinfo"><code>DynamicPPL.VarInfo</code></a><span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct VarInfo{Tmeta, Tlogp} &lt;: AbstractVarInfo
metadata::Tmeta
logp::Base.RefValue{Tlogp}
Expand Down
Loading

0 comments on commit ada0377

Please sign in to comment.