Skip to content

Commit

Permalink
doc: Update documentation for main
Browse files Browse the repository at this point in the history
  • Loading branch information
nxbench bot committed Dec 11, 2024
1 parent 42b4bd7 commit f0077e0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions main/_modules/nxbench/cli.html
Original file line number Diff line number Diff line change
Expand Up @@ -587,9 +587,11 @@ <h1>Source code for nxbench.cli</h1><div class="highlight"><pre>
<span class="k">except</span> <span class="ne">FileNotFoundError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">click</span><span class="o">.</span><span class="n">ClickException</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>

<span class="n">machine</span> <span class="o">=</span> <span class="n">platform</span><span class="o">.</span><span class="n">node</span><span class="p">()</span>
<span class="n">env_data</span> <span class="o">=</span> <span class="n">get_benchmark_config</span><span class="p">()</span><span class="o">.</span><span class="n">env_data</span>
<span class="n">config_data</span><span class="p">[</span><span class="s2">&quot;pythons&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">env_data</span><span class="p">[</span><span class="s2">&quot;pythons&quot;</span><span class="p">]</span>
<span class="n">config_data</span><span class="p">[</span><span class="s2">&quot;req&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">env_data</span><span class="p">[</span><span class="s2">&quot;req&quot;</span><span class="p">]</span>
<span class="n">config_data</span><span class="p">[</span><span class="s2">&quot;machine&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">machine</span>

<span class="k">if</span> <span class="n">results_dir</span><span class="p">:</span>
<span class="n">config_data</span><span class="p">[</span><span class="s2">&quot;results_dir&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">results_dir</span><span class="p">)</span>
Expand Down Expand Up @@ -634,6 +636,12 @@ <h1>Source code for nxbench.cli</h1><div class="highlight"><pre>
<span class="s2">&quot;Could not determine git commit hash. Proceeding without it.&quot;</span>
<span class="p">)</span>

<span class="k">try</span><span class="p">:</span>
<span class="n">safe_args</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;--machine=</span><span class="si">{</span><span class="n">machine</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="n">logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Set machine to: </span><span class="si">{</span><span class="n">machine</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="k">except</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">CalledProcessError</span><span class="p">:</span>
<span class="n">logger</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span><span class="s2">&quot;Could not determine machine. Proceeding without it.&quot;</span><span class="p">)</span>

<span class="n">old_cwd</span> <span class="o">=</span> <span class="n">Path</span><span class="o">.</span><span class="n">cwd</span><span class="p">()</span>
<span class="k">if</span> <span class="n">_has_git</span><span class="p">:</span>
<span class="n">os</span><span class="o">.</span><span class="n">chdir</span><span class="p">(</span><span class="n">project_root</span><span class="p">)</span>
Expand Down

0 comments on commit f0077e0

Please sign in to comment.