Skip to content

Commit

Permalink
Deploying to gh-pages from @ 53dc98d 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
leavauchier committed May 7, 2024
1 parent 32ccca8 commit 2392740
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 172 deletions.
11 changes: 6 additions & 5 deletions _modules/myria3d/callbacks/comet_callbacks.html
Original file line number Diff line number Diff line change
Expand Up @@ -238,16 +238,17 @@ <h1>Source code for myria3d.callbacks.comet_callbacks</h1><div class="highlight"
<span class="n">logger</span><span class="o">.</span><span class="n">experiment</span><span class="o">.</span><span class="n">log_parameter</span><span class="p">(</span><span class="s2">&quot;experiment_logs_dirpath&quot;</span><span class="p">,</span> <span class="n">log_path</span><span class="p">)</span></div></div>


<div class="viewcode-block" id="log_comet_cm"><a class="viewcode-back" href="../../../apidoc/myria3d.callbacks.html#myria3d.callbacks.comet_callbacks.log_comet_cm">[docs]</a><span class="k">def</span> <span class="nf">log_comet_cm</span><span class="p">(</span><span class="n">lightning_module</span><span class="p">,</span> <span class="n">confmat</span><span class="p">,</span> <span class="n">phase</span><span class="p">):</span>
<span class="n">logger</span> <span class="o">=</span> <span class="n">get_comet_logger</span><span class="p">(</span><span class="n">trainer</span><span class="o">=</span><span class="n">lightning_module</span><span class="p">)</span>
<div class="viewcode-block" id="log_comet_cm"><a class="viewcode-back" href="../../../apidoc/myria3d.callbacks.html#myria3d.callbacks.comet_callbacks.log_comet_cm">[docs]</a><span class="k">def</span> <span class="nf">log_comet_cm</span><span class="p">(</span><span class="n">pl_module</span><span class="p">,</span> <span class="n">confmat</span><span class="p">,</span> <span class="n">phase</span><span class="p">,</span> <span class="n">class_names</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Method used in the metric logging callback.&quot;&quot;&quot;</span>
<span class="n">logger</span> <span class="o">=</span> <span class="n">get_comet_logger</span><span class="p">(</span><span class="n">trainer</span><span class="o">=</span><span class="n">pl_module</span><span class="o">.</span><span class="n">trainer</span><span class="p">)</span>
<span class="k">if</span> <span class="n">logger</span><span class="p">:</span>
<span class="n">labels</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">lightning_module</span><span class="o">.</span><span class="n">hparams</span><span class="o">.</span><span class="n">classification_dict</span><span class="o">.</span><span class="n">values</span><span class="p">())</span>
<span class="n">class_names</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">pl_module</span><span class="o">.</span><span class="n">hparams</span><span class="o">.</span><span class="n">classification_dict</span><span class="o">.</span><span class="n">values</span><span class="p">())</span>
<span class="n">logger</span><span class="o">.</span><span class="n">experiment</span><span class="o">.</span><span class="n">log_confusion_matrix</span><span class="p">(</span>
<span class="n">matrix</span><span class="o">=</span><span class="n">confmat</span><span class="o">.</span><span class="n">cpu</span><span class="p">()</span><span class="o">.</span><span class="n">numpy</span><span class="p">()</span><span class="o">.</span><span class="n">tolist</span><span class="p">(),</span>
<span class="n">labels</span><span class="o">=</span><span class="n">labels</span><span class="p">,</span>
<span class="n">labels</span><span class="o">=</span><span class="n">class_names</span><span class="p">,</span>
<span class="n">file_name</span><span class="o">=</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">phase</span><span class="si">}</span><span class="s2">-confusion-matrix&quot;</span><span class="p">,</span>
<span class="n">title</span><span class="o">=</span><span class="s2">&quot;</span><span class="si">{phase}</span><span class="s2"> confusion matrix&quot;</span><span class="p">,</span>
<span class="n">epoch</span><span class="o">=</span><span class="n">lightning_module</span><span class="o">.</span><span class="n">current_epoch</span><span class="p">,</span>
<span class="n">epoch</span><span class="o">=</span><span class="n">pl_module</span><span class="o">.</span><span class="n">current_epoch</span><span class="p">,</span>
<span class="p">)</span></div>
</pre></div>

Expand Down
83 changes: 5 additions & 78 deletions _modules/myria3d/models/model.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions apidoc/configs.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,9 @@ <h1>Default configuration<a class="headerlink" href="#default-configuration" tit
<span class="w"> </span><span class="nt">mode</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">min</span>
<span class="w"> </span><span class="nt">patience</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">6</span>
<span class="w"> </span><span class="nt">min_delta</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">0</span>
<span class="w"> </span><span class="nt">model_detailed_metrics</span><span class="p">:</span>
<span class="w"> </span><span class="nt">_target_</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">myria3d.callbacks.metric_callbacks.ModelMetrics</span>
<span class="w"> </span><span class="nt">num_classes</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">${model.num_classes}</span>
<span class="nt">model</span><span class="p">:</span>
<span class="w"> </span><span class="nt">optimizer</span><span class="p">:</span>
<span class="w"> </span><span class="nt">_target_</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">functools.partial</span>
Expand Down
5 changes: 3 additions & 2 deletions apidoc/myria3d.callbacks.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,9 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this

<dl class="py function">
<dt class="sig sig-object py" id="myria3d.callbacks.comet_callbacks.log_comet_cm">
<span class="sig-prename descclassname"><span class="pre">myria3d.callbacks.comet_callbacks.</span></span><span class="sig-name descname"><span class="pre">log_comet_cm</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">lightning_module</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">confmat</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">phase</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/myria3d/callbacks/comet_callbacks.html#log_comet_cm"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#myria3d.callbacks.comet_callbacks.log_comet_cm" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<span class="sig-prename descclassname"><span class="pre">myria3d.callbacks.comet_callbacks.</span></span><span class="sig-name descname"><span class="pre">log_comet_cm</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">pl_module</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">confmat</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">phase</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">class_names</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/myria3d/callbacks/comet_callbacks.html#log_comet_cm"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#myria3d.callbacks.comet_callbacks.log_comet_cm" title="Permalink to this definition"></a></dt>
<dd><p>Method used in the metric logging callback.</p>
</dd></dl>

</section>
<section id="module-myria3d.callbacks.finetuning_callbacks">
Expand Down
Loading

0 comments on commit 2392740

Please sign in to comment.