Skip to content

Commit dc9107e

Browse files
Update navbar (automated)
1 parent c07d961 commit dc9107e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

previews/PR68/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@
481481
<!-- NAVBAR END -->
482482

483483

484+
484485
<div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href>TuringCallbacks.jl</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><ul class="internal"><li><a class="tocitem" href="#Getting-started"><span>Getting started</span></a></li><li><a class="tocitem" href="#Visualizing-sampling-on-the-fly"><span>Visualizing sampling on-the-fly</span></a></li><li><a class="tocitem" href="#Supporting-TensorBoardCallback-with-your-own-sampler"><span>Supporting <code>TensorBoardCallback</code> with your own sampler</span></a></li><li><a class="tocitem" href="#Types-and-Functions"><span>Types &amp; Functions</span></a></li><li><a class="tocitem" href="#Internals"><span>Internals</span></a></li><li><a class="tocitem" href="#Index"><span>Index</span></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/TuringCallbacks.jl/blob/main/docs/src/index.md#L" 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="TuringCallbacks"><a class="docs-heading-anchor" href="#TuringCallbacks">TuringCallbacks</a><a id="TuringCallbacks-1"></a><a class="docs-heading-anchor-permalink" href="#TuringCallbacks" title="Permalink"></a></h1><ul><li><a href="#TuringCallbacks">TuringCallbacks</a></li><li class="no-marker"><ul><li><a href="#Getting-started">Getting started</a></li><li><a href="#Visualizing-sampling-on-the-fly">Visualizing sampling on-the-fly</a></li><li><a href="#Supporting-TensorBoardCallback-with-your-own-sampler">Supporting <code>TensorBoardCallback</code> with your own sampler</a></li><li><a href="#Types-and-Functions">Types &amp; Functions</a></li><li><a href="#Internals">Internals</a></li><li><a href="#Index">Index</a></li></ul></li></ul><h2 id="Getting-started"><a class="docs-heading-anchor" href="#Getting-started">Getting started</a><a id="Getting-started-1"></a><a class="docs-heading-anchor-permalink" href="#Getting-started" title="Permalink"></a></h2><p>As the package is not yet officially released, the package has to be added from the GitHub repository:</p><pre><code class="language-julia hljs">julia&gt; ]
485486
pkg&gt; add TuringCallbacks.jl</code></pre><h2 id="Visualizing-sampling-on-the-fly"><a class="docs-heading-anchor" href="#Visualizing-sampling-on-the-fly">Visualizing sampling on-the-fly</a><a id="Visualizing-sampling-on-the-fly-1"></a><a class="docs-heading-anchor-permalink" href="#Visualizing-sampling-on-the-fly" title="Permalink"></a></h2><p><code>TensorBoardCallback</code> is a wrapper around <code>Base.CoreLogging.AbstractLogger</code> which can be used to create a <code>callback</code> compatible with <code>Turing.sample</code>.</p><p>To actually visualize the results of the logging, you need to have installed <code>tensorboard</code> in Python. If you do not have <code>tensorboard</code> installed, it should hopefully be sufficient to just run</p><pre><code class="language-sh hljs">pip3 install tensorboard</code></pre><p>Then you can start up the <code>TensorBoard</code>:</p><pre><code class="language-sh hljs">python3 -m tensorboard.main --logdir tensorboard_logs/run</code></pre><p>Now we&#39;re ready to actually write some Julia code.</p><p>The following snippet demonstrates the usage of <code>TensorBoardCallback</code> on a simple model. This will write a set of statistics at each iteration to an event-file compatible with Tensorboard:</p><pre><code class="language-julia hljs">using Turing, TuringCallbacks
486487

0 commit comments

Comments
 (0)