You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/01_spot_intro.html
+58-8Lines changed: 58 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -318,6 +318,7 @@ <h2 id="toc-title">Table of contents</h2>
318
318
<li><ahref="#spot-parameters-fun_evals-init_size-and-show_models" id="toc-spot-parameters-fun_evals-init_size-and-show_models" class="nav-link" data-scroll-target="#spot-parameters-fun_evals-init_size-and-show_models"><spanclass="header-section-number">1.4</span><code>Spot</code> Parameters: <code>fun_evals</code>, <code>init_size</code> and <code>show_models</code></a></li>
319
319
<li><ahref="#print-the-results" id="toc-print-the-results" class="nav-link" data-scroll-target="#print-the-results"><spanclass="header-section-number">1.5</span> Print the Results</a></li>
320
320
<li><ahref="#show-the-progress" id="toc-show-the-progress" class="nav-link" data-scroll-target="#show-the-progress"><spanclass="header-section-number">1.6</span> Show the Progress</a></li>
321
+
<li><ahref="#sec-visualizing-tensorboard-01" id="toc-sec-visualizing-tensorboard-01" class="nav-link" data-scroll-target="#sec-visualizing-tensorboard-01"><spanclass="header-section-number">1.7</span> Visualizing the Hyperparameter Tuning Process with TensorBoard</a></li>
<h2data-number="1.7" class="anchored" data-anchor-id="sec-visualizing-tensorboard-01"><spanclass="header-section-number">1.7</span> Visualizing the Hyperparameter Tuning Process with TensorBoard</h2>
514
+
<p><code>spotPython</code> supports the visualization of the hyperparameter tuning process with TensorBoard. The following example shows how to use TensorBoard with <code>spotPython</code>.</p>
515
+
<p>First, we define an “experiment name” to identify the hyperparameter tuning process. The experiment name is used to create a directory for the TensorBoard files.</p>
<p>Since the <code>spot_tensorboard_path</code> is defined, <code>spotPython</code> will log the optimization process in the TensorBoard files. The TensorBoard files are stored in the directory <code>spot_tensorboard_path</code>. We can pass the TensorBoard information to the <code>Spot</code> method via the <code>fun_control</code> dictionary.</p>
<pre><code><spotPython.spot.spot.Spot at 0x2b23578e0></code></pre>
544
+
</div>
545
+
</div>
546
+
<p>Now we can start TensorBoard in the background. The TensorBoard process will read the TensorBoard files and visualize the hyperparameter tuning process. From the terminal, we can start TensorBoard with the following command:</p>
<p><code>logdir</code> is the directory where the TensorBoard files are stored. In our case, the TensorBoard files are stored in the directory <code>./runs</code>.</p>
549
+
<p>TensorBoard will start a web server on port 6006. We can access the TensorBoard web server with the following URL:</p>
<p>The first TensorBoard visualization shows the objective function values plotted against the wall time. The wall time is the time that has passed since the start of the hyperparameter tuning process. The five initial design points are shown in the upper left region of the plot. The line visualizes the optimization process. <imgsrc="figures_static/01_tensorboard_01.png" class="img-fluid" alt="TensorBoard visualization of the spotPython process. Objective function values plotted against wall time."></p>
552
+
<p>The second TensorBoard visualization shows the input values, i.e., <spanclass="math inline">\(x_0\)</span>, plotted against the wall time. <imgsrc="figures_static/01_tensorboard_02.png" class="img-fluid" alt="TensorBoard visualization of the spotPython process."></p>
553
+
<p>The third TensorBoard plot illustrates how <code>spotPython</code> can be used as a microscope for the internal mechanisms of the surrogate-based optimization process. Here, one important parameter, the learning rate <spanclass="math inline">\(\theta\)</span> of the Kriging surrogate is plotted against the number of optimization steps.</p>
0 commit comments