Skip to content

Commit

Permalink
auto-generating sphinx docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pytorchbot committed Nov 1, 2024
1 parent 2404c98 commit d81fff0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main/_modules/torchtune/config/_utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,11 @@ <h1>Source code for torchtune.config._utils</h1><div class="highlight"><pre>
<span class="c1"># key string to reflect this</span>
<span class="k">if</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">yaml_kwargs</span> <span class="ow">and</span> <span class="n">_has_component</span><span class="p">(</span><span class="n">yaml_kwargs</span><span class="p">[</span><span class="n">k</span><span class="p">]):</span>
<span class="n">k</span> <span class="o">+=</span> <span class="s2">&quot;._component_&quot;</span>

<span class="c1"># None passed via CLI will be parsed as string, but we really want OmegaConf null</span>
<span class="k">if</span> <span class="n">v</span> <span class="o">==</span> <span class="s2">&quot;None&quot;</span><span class="p">:</span>
<span class="n">v</span> <span class="o">=</span> <span class="s2">&quot;!!null&quot;</span>

<span class="c1"># TODO: this is a hack but otherwise we can&#39;t pass strings with leading zeroes</span>
<span class="c1"># to define the checkpoint file format. We manually override OmegaConf behavior</span>
<span class="c1"># by prepending the value with !!str to force a string type</span>
Expand Down

0 comments on commit d81fff0

Please sign in to comment.