Skip to content

Commit

Permalink
Sarah Segel: Merge pull request #104 from automl/bug/pre-runselection…
Browse files Browse the repository at this point in the history
…-errors
  • Loading branch information
Github Actions committed Jan 17, 2024
1 parent 83237d1 commit 79ad7d8
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion development/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 19058a216288311270b2d5b6ce1eaac4
config: 8676aa536a6642a27981005f241a0f25
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified development/.doctrees/environment.pickle
Binary file not shown.
Binary file not shown.
Binary file not shown.
18 changes: 10 additions & 8 deletions development/_modules/deepcave/plugins.html
Original file line number Diff line number Diff line change
Expand Up @@ -1078,16 +1078,18 @@ <h1>Source code for deepcave.plugins</h1><div class="highlight"><pre>
<span class="k">if</span> <span class="s2">&quot;hyperparameter_name_2&quot;</span> <span class="ow">in</span> <span class="n">_inputs</span><span class="o">.</span><span class="n">keys</span><span class="p">():</span>
<span class="n">update_dict</span><span class="p">(</span><span class="n">_inputs</span><span class="p">,</span> <span class="p">{</span><span class="s2">&quot;hyperparameter_name_2&quot;</span><span class="p">:</span> <span class="p">{</span><span class="s2">&quot;value&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">}})</span>

<span class="n">selected_run</span> <span class="o">=</span> <span class="n">run_handler</span><span class="o">.</span><span class="n">get_run</span><span class="p">(</span><span class="n">_run_id</span><span class="p">)</span>
<span class="k">if</span> <span class="n">_run_id</span><span class="p">:</span>
<span class="n">selected_run</span> <span class="o">=</span> <span class="n">run_handler</span><span class="o">.</span><span class="n">get_run</span><span class="p">(</span><span class="n">_run_id</span><span class="p">)</span>

<span class="c1"># How to update only parameters which have a dependency?</span>
<span class="n">user_dependencies_inputs</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">load_dependency_inputs</span><span class="p">(</span>
<span class="n">selected_run</span><span class="p">,</span> <span class="n">_previous_inputs</span><span class="p">,</span> <span class="n">_inputs</span>
<span class="p">)</span>
<span class="k">if</span> <span class="n">selected_run</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="c1"># How to update only parameters which have a dependency?</span>
<span class="n">user_dependencies_inputs</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">load_dependency_inputs</span><span class="p">(</span>
<span class="n">selected_run</span><span class="p">,</span> <span class="n">_previous_inputs</span><span class="p">,</span> <span class="n">_inputs</span>
<span class="p">)</span>

<span class="c1"># Update dict</span>
<span class="c1"># dict.update() remove keys, so we use our own method to do so</span>
<span class="n">update_dict</span><span class="p">(</span><span class="n">inputs</span><span class="p">,</span> <span class="n">user_dependencies_inputs</span><span class="p">)</span> <span class="c1"># inplace operation</span>
<span class="c1"># Update dict</span>
<span class="c1"># dict.update() remove keys, so we use our own method to do so</span>
<span class="n">update_dict</span><span class="p">(</span><span class="n">inputs</span><span class="p">,</span> <span class="n">user_dependencies_inputs</span><span class="p">)</span> <span class="c1"># inplace operation</span>

<span class="c1"># Let&#39;s cast the inputs</span>
<span class="n">inputs</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_cast_inputs</span><span class="p">(</span><span class="n">inputs</span><span class="p">)</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,6 @@ <h1>Source code for deepcave.plugins.hyperparameter.importances</h1><div class="
<span class="c1"># Pre-set values</span>
<span class="k">if</span> <span class="n">objective_value</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">objective_value</span> <span class="o">=</span> <span class="n">objective_ids</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
<span class="n">n_hps</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">hp_names</span><span class="p">)</span>

<span class="k">if</span> <span class="n">n_hps</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="n">n_hps</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">hp_names</span><span class="p">)</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,6 @@ <h1>Source code for deepcave.plugins.objective.parallel_coordinates</h1><div cla
<span class="n">objective_value</span> <span class="o">=</span> <span class="n">objective_ids</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
<span class="n">budget_value</span> <span class="o">=</span> <span class="n">budget_ids</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
<span class="n">hp_value</span> <span class="o">=</span> <span class="n">hp_names</span>
<span class="n">n_hps</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">hp_names</span><span class="p">)</span>

<span class="k">if</span> <span class="n">n_hps</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="n">n_hps</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">hp_names</span><span class="p">)</span>
Expand Down

0 comments on commit 79ad7d8

Please sign in to comment.