Skip to content

Commit

Permalink
mwever: Merge pull request #192 from automl/190-working-directory-uni…
Browse files Browse the repository at this point in the history
…ntuitive-selection-of-runs
  • Loading branch information
Github Actions committed Nov 4, 2024
1 parent 44e91ad commit 27037b2
Show file tree
Hide file tree
Showing 125 changed files with 580 additions and 26 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: 5f5cc67e9884aa53630cf60444ed0069
config: 7025bbd0c56da8b033f6701c08ab0258
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified development/.doctrees/api/deepcave.evaluators.ablation.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.evaluators.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.evaluators.epm.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.evaluators.epm.utils.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.evaluators.fanova.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.evaluators.footprint.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.evaluators.lpi.doctree
Binary file not shown.
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.evaluators.mo_fanova.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.evaluators.mo_lpi.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.layouts.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.layouts.header.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.layouts.not_found.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.layouts.sidebar.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.plugins.budget.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.plugins.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.plugins.dynamic.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.plugins.objective.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.plugins.static.doctree
Binary file not shown.
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.plugins.summary.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.runs.converters.amltk.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.runs.converters.bohb.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.runs.converters.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.runs.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.runs.exceptions.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.runs.group.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.runs.handler.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.runs.objective.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.runs.recorder.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.runs.run.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.runs.status.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.runs.trial.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.utils.cache.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.utils.cast.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.utils.compression.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.utils.configs.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.utils.configspace.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.utils.converters.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.utils.dash.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.utils.data_structures.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.utils.docs.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.utils.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.utils.files.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.utils.hash.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.utils.layout.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.utils.logs.doctree
Binary file not shown.
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.utils.notification.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.utils.run_caches.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.utils.styled_plotty.doctree
Binary file not shown.
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.utils.url.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/deepcave.utils.util.doctree
Binary file not shown.
Binary file modified development/.doctrees/converters/bohb.doctree
Binary file not shown.
Binary file modified development/.doctrees/converters/custom_converters.doctree
Binary file not shown.
Binary file modified development/.doctrees/converters/deepcave.doctree
Binary file not shown.
Binary file modified development/.doctrees/converters/optuna.doctree
Binary file not shown.
Binary file modified development/.doctrees/converters/smac.doctree
Binary file not shown.
Binary file modified development/.doctrees/environment.pickle
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.19"
"version": "3.9.20"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.19"
"version": "3.9.20"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.19"
"version": "3.9.20"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.19"
"version": "3.9.20"
}
},
"nbformat": 4,
Expand Down
Binary file modified development/_downloads/ca45e64eb26e32125a4561a719e13205/pdp.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.19"
"version": "3.9.20"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.19"
"version": "3.9.20"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.19"
"version": "3.9.20"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
26 changes: 26 additions & 0 deletions development/_modules/deepcave/runs/converters/amltk.html
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,7 @@ <h1>Source code for deepcave.runs.converters.amltk</h1><div class="highlight"><p

<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Optional</span><span class="p">,</span> <span class="n">Sequence</span><span class="p">,</span> <span class="n">Union</span>

<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">re</span>
<span class="kn">from</span> <span class="nn">pathlib</span> <span class="kn">import</span> <span class="n">Path</span>

Expand Down Expand Up @@ -1019,6 +1020,31 @@ <h1>Source code for deepcave.runs.converters.amltk</h1><div class="highlight"><p
<span class="p">)</span>

<span class="k">return</span> <span class="n">run</span></div>


<div class="viewcode-block" id="AMLTKRun.is_valid_run">
<a class="viewcode-back" href="../../../../api/deepcave.runs.converters.amltk.html#deepcave.runs.converters.amltk.AMLTKRun.is_valid_run">[docs]</a>
<span class="nd">@classmethod</span>
<span class="k">def</span> <span class="nf">is_valid_run</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">path_name</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check whether the path name belongs to a valid amltk run.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> path_name: str</span>
<span class="sd"> The path to check.</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
<span class="sd"> bool</span>
<span class="sd"> True if path is valid run.</span>
<span class="sd"> False otherwise.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isfile</span><span class="p">(</span><span class="n">path_name</span> <span class="o">+</span> <span class="s2">&quot;/history.parquet&quot;</span><span class="p">)</span> <span class="ow">and</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isfile</span><span class="p">(</span>
<span class="n">path_name</span> <span class="o">+</span> <span class="s2">&quot;/configspace.json&quot;</span>
<span class="p">):</span>
<span class="k">return</span> <span class="kc">True</span>
<span class="k">return</span> <span class="kc">False</span></div>
</div>

</pre></div>
Expand Down
24 changes: 24 additions & 0 deletions development/_modules/deepcave/runs/converters/bohb.html
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,7 @@ <h1>Source code for deepcave.runs.converters.bohb</h1><div class="highlight"><pr

<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Any</span><span class="p">,</span> <span class="n">Dict</span><span class="p">,</span> <span class="n">Union</span>

<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">pathlib</span> <span class="kn">import</span> <span class="n">Path</span>

<span class="kn">from</span> <span class="nn">ConfigSpace.configuration_space</span> <span class="kn">import</span> <span class="n">ConfigurationSpace</span>
Expand Down Expand Up @@ -981,6 +982,29 @@ <h1>Source code for deepcave.runs.converters.bohb</h1><div class="highlight"><pr
<span class="p">)</span>

<span class="k">return</span> <span class="n">run</span></div>


<div class="viewcode-block" id="BOHBRun.is_valid_run">
<a class="viewcode-back" href="../../../../api/deepcave.runs.converters.bohb.html#deepcave.runs.converters.bohb.BOHBRun.is_valid_run">[docs]</a>
<span class="nd">@classmethod</span>
<span class="k">def</span> <span class="nf">is_valid_run</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">path_name</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check whether the path name belongs to a valid bohb run.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> path_name: str</span>
<span class="sd"> The path to check.</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
<span class="sd"> bool</span>
<span class="sd"> True if path is valid run.</span>
<span class="sd"> False otherwise.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isfile</span><span class="p">(</span><span class="n">path_name</span> <span class="o">+</span> <span class="s2">&quot;/configspace.json&quot;</span><span class="p">):</span>
<span class="k">return</span> <span class="kc">True</span>
<span class="k">return</span> <span class="kc">False</span></div>
</div>

</pre></div>
Expand Down
27 changes: 26 additions & 1 deletion development/_modules/deepcave/runs/converters/dataframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,32 @@ <h1>Source code for deepcave.runs.converters.dataframe</h1><div class="highlight
<span class="n">meta</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;config_id&quot;</span><span class="p">,</span> <span class="s2">&quot;start_time&quot;</span><span class="p">,</span> <span class="s2">&quot;end_time&quot;</span><span class="p">,</span> <span class="s2">&quot;status&quot;</span><span class="p">]</span>
<span class="n">additional</span> <span class="o">=</span> <span class="n">data</span><span class="o">.</span><span class="n">drop</span><span class="p">(</span><span class="n">hyperparameters</span> <span class="o">+</span> <span class="n">costs_metrics</span> <span class="o">+</span> <span class="n">budgets</span> <span class="o">+</span> <span class="n">seeds</span> <span class="o">+</span> <span class="n">meta</span><span class="p">)</span>
<span class="n">additional</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span><span class="n">additional</span><span class="p">)</span>
<span class="k">return</span> <span class="p">{</span><span class="n">key</span><span class="p">:</span> <span class="n">value</span> <span class="k">if</span> <span class="n">pd</span><span class="o">.</span><span class="n">notna</span><span class="p">(</span><span class="n">value</span><span class="p">)</span> <span class="k">else</span> <span class="kc">None</span> <span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">additional</span><span class="o">.</span><span class="n">items</span><span class="p">()}</span></div>
<span class="k">return</span> <span class="p">{</span><span class="n">key</span><span class="p">:</span> <span class="n">value</span> <span class="k">if</span> <span class="n">pd</span><span class="o">.</span><span class="n">notna</span><span class="p">(</span><span class="n">value</span><span class="p">)</span> <span class="k">else</span> <span class="kc">None</span> <span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">additional</span><span class="o">.</span><span class="n">items</span><span class="p">()}</span>

<div class="viewcode-block" id="DataFrameRun.is_valid_run">
<a class="viewcode-back" href="../../../../api/deepcave.runs.converters.dataframe.html#deepcave.runs.converters.dataframe.DataFrameRun.is_valid_run">[docs]</a>
<span class="nd">@classmethod</span>
<span class="k">def</span> <span class="nf">is_valid_run</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">path_name</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check whether the path name belongs to a valid dataframe run.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> path_name: str</span>
<span class="sd"> The path to check.</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
<span class="sd"> bool</span>
<span class="sd"> True if path is valid run.</span>
<span class="sd"> False otherwise.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isfile</span><span class="p">(</span><span class="n">path_name</span> <span class="o">+</span> <span class="s2">&quot;/trials.csv&quot;</span><span class="p">)</span> <span class="ow">and</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isfile</span><span class="p">(</span>
<span class="n">path_name</span> <span class="o">+</span> <span class="s2">&quot;/configspace.csv&quot;</span>
<span class="p">):</span>
<span class="k">return</span> <span class="kc">True</span>
<span class="k">return</span> <span class="kc">False</span></div>
</div>

</pre></div>

Expand Down
24 changes: 24 additions & 0 deletions development/_modules/deepcave/runs/converters/deepcave.html
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,7 @@ <h1>Source code for deepcave.runs.converters.deepcave</h1><div class="highlight"

<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Union</span>

<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">pathlib</span> <span class="kn">import</span> <span class="n">Path</span>

<span class="kn">from</span> <span class="nn">deepcave.runs.run</span> <span class="kn">import</span> <span class="n">Run</span>
Expand Down Expand Up @@ -896,6 +897,29 @@ <h1>Source code for deepcave.runs.converters.deepcave</h1><div class="highlight"
<span class="sd"> The DeepCAVE run.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">DeepCAVERun</span><span class="p">(</span><span class="n">path</span><span class="o">.</span><span class="n">stem</span><span class="p">,</span> <span class="n">path</span><span class="o">=</span><span class="n">Path</span><span class="p">(</span><span class="n">path</span><span class="p">))</span></div>


<div class="viewcode-block" id="DeepCAVERun.is_valid_run">
<a class="viewcode-back" href="../../../../api/deepcave.runs.converters.deepcave.html#deepcave.runs.converters.deepcave.DeepCAVERun.is_valid_run">[docs]</a>
<span class="nd">@classmethod</span>
<span class="k">def</span> <span class="nf">is_valid_run</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">path_name</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check whether the path name belongs to a valid deepcave run.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> path_name: str</span>
<span class="sd"> The path to check.</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
<span class="sd"> bool</span>
<span class="sd"> True if path is valid run.</span>
<span class="sd"> False otherwise.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isfile</span><span class="p">(</span><span class="n">path_name</span> <span class="o">+</span> <span class="s2">&quot;history.jsonl&quot;</span><span class="p">):</span>
<span class="k">return</span> <span class="kc">True</span>
<span class="k">return</span> <span class="kc">False</span></div>
</div>

</pre></div>
Expand Down
25 changes: 25 additions & 0 deletions development/_modules/deepcave/runs/converters/optuna.html
Original file line number Diff line number Diff line change
Expand Up @@ -1089,6 +1089,31 @@ <h1>Source code for deepcave.runs.converters.optuna</h1><div class="highlight"><
<span class="p">)</span>

<span class="k">return</span> <span class="n">run</span></div>


<div class="viewcode-block" id="OptunaRun.is_valid_run">
<a class="viewcode-back" href="../../../../api/deepcave.runs.converters.optuna.html#deepcave.runs.converters.optuna.OptunaRun.is_valid_run">[docs]</a>
<span class="nd">@classmethod</span>
<span class="k">def</span> <span class="nf">is_valid_run</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">path_name</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check whether the path name belongs to a valid optuna run.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> path_name: str</span>
<span class="sd"> The path to check.</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
<span class="sd"> bool</span>
<span class="sd"> True if path is valid run.</span>
<span class="sd"> False otherwise.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">path</span> <span class="o">=</span> <span class="n">Path</span><span class="p">(</span><span class="n">path_name</span><span class="p">)</span>
<span class="n">pickle_files</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">path</span><span class="o">.</span><span class="n">glob</span><span class="p">(</span><span class="s2">&quot;*.pkl&quot;</span><span class="p">))</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">pickle_files</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">1</span><span class="p">:</span>
<span class="k">return</span> <span class="kc">False</span>
<span class="k">return</span> <span class="kc">True</span></div>
</div>

</pre></div>
Expand Down
26 changes: 26 additions & 0 deletions development/_modules/deepcave/runs/converters/smac3v1.html
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,7 @@ <h1>Source code for deepcave.runs.converters.smac3v1</h1><div class="highlight">
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Optional</span><span class="p">,</span> <span class="n">Union</span>

<span class="kn">import</span> <span class="nn">json</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">pathlib</span> <span class="kn">import</span> <span class="n">Path</span>

<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
Expand Down Expand Up @@ -1021,6 +1022,31 @@ <h1>Source code for deepcave.runs.converters.smac3v1</h1><div class="highlight">
<span class="p">)</span>

<span class="k">return</span> <span class="n">run</span></div>


<div class="viewcode-block" id="SMAC3v1Run.is_valid_run">
<a class="viewcode-back" href="../../../../api/deepcave.runs.converters.smac3v1.html#deepcave.runs.converters.smac3v1.SMAC3v1Run.is_valid_run">[docs]</a>
<span class="nd">@classmethod</span>
<span class="k">def</span> <span class="nf">is_valid_run</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">path_name</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check whether the path name belongs to a valid smac3v1 run.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> path_name: str</span>
<span class="sd"> The path to check.</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
<span class="sd"> bool</span>
<span class="sd"> True if path is valid run.</span>
<span class="sd"> False otherwise.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isfile</span><span class="p">(</span><span class="n">path_name</span> <span class="o">+</span> <span class="s2">&quot;/runhistory.json&quot;</span><span class="p">)</span> <span class="ow">and</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isfile</span><span class="p">(</span>
<span class="n">path_name</span> <span class="o">+</span> <span class="s2">&quot;/configspace.json&quot;</span>
<span class="p">):</span>
<span class="k">return</span> <span class="kc">True</span>
<span class="k">return</span> <span class="kc">False</span></div>
</div>

</pre></div>
Expand Down
Loading

0 comments on commit 27037b2

Please sign in to comment.