Skip to content

Commit

Permalink
Eddie Bergman: fix(RandomForest): Always cast seed to int (#1084)
Browse files Browse the repository at this point in the history
  • Loading branch information
Github Actions committed Nov 21, 2023
1 parent 6f938ea commit ce522f5
Show file tree
Hide file tree
Showing 350 changed files with 6,810 additions and 1,834 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: 7f068bf04e142c0f8266fc6c671f79f9
config: 5409e0abde3066122398ce4fe6b15d7e
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file not shown.
Binary file modified development/.doctrees/api/smac.acquisition.function.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/smac.callback.callback.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/smac.callback.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/smac.callback.metadata_callback.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/smac.facade.abstract_facade.doctree
Binary file not shown.
Binary file not shown.
Binary file modified development/.doctrees/api/smac.facade.blackbox_facade.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/smac.facade.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/smac.facade.hyperband_facade.doctree
Binary file not shown.
Binary file not shown.
Binary file modified development/.doctrees/api/smac.facade.multi_fidelity_facade.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/smac.facade.random_facade.doctree
Binary file not shown.
Binary file not shown.
Binary file modified development/.doctrees/api/smac.intensifier.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/smac.intensifier.hyperband.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/smac.intensifier.intensifier.doctree
Binary file not shown.
Binary file not shown.
Binary file modified development/.doctrees/api/smac.main.smbo.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/smac.model.abstract_model.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/smac.model.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified development/.doctrees/api/smac.model.multi_objective_model.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/smac.model.random_forest.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified development/.doctrees/api/smac.multi_objective.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/smac.multi_objective.parego.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified development/.doctrees/api/smac.random_design.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/smac.random_design.modulus_design.doctree
Binary file not shown.
Binary file not shown.
Binary file modified development/.doctrees/api/smac.runhistory.dataclasses.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/smac.runhistory.doctree
Binary file not shown.
Binary file not shown.
Binary file modified development/.doctrees/api/smac.runhistory.encoder.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/smac.runhistory.encoder.encoder.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 modified development/.doctrees/api/smac.runhistory.runhistory.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/smac.runner.abstract_runner.doctree
Binary file not shown.
Binary file not shown.
Binary file modified development/.doctrees/api/smac.runner.dask_runner.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/smac.runner.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified development/.doctrees/api/smac.scenario.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/smac.utils.configspace.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/smac.utils.data_structures.doctree
Binary file not shown.
Binary file modified development/.doctrees/api/smac.utils.logging.doctree
Binary file not shown.
Binary file modified development/.doctrees/environment.pickle
Binary file not shown.
Binary file not shown.
Binary file modified development/.doctrees/examples/1_basics/2_svm_cv.doctree
Binary file not shown.
Binary file modified development/.doctrees/examples/1_basics/3_ask_and_tell.doctree
Binary file not shown.
Binary file modified development/.doctrees/examples/1_basics/4_callback.doctree
Binary file not shown.
Binary file modified development/.doctrees/examples/1_basics/5_continue.doctree
Binary file not shown.
Binary file modified development/.doctrees/examples/1_basics/6_priors.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 not shown.
Binary file not shown.
Binary file not shown.
Binary file added development/.doctrees/sg_execution_times.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified development/_images/sphx_glr_1_mlp_epochs_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified development/_images/sphx_glr_1_mlp_epochs_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified development/_images/sphx_glr_1_quadratic_function_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified development/_images/sphx_glr_1_schaffer_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified development/_images/sphx_glr_1_schaffer_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified development/_images/sphx_glr_2_parego_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified development/_images/sphx_glr_2_parego_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,9 @@ <h1>Source code for smac.model.random_forest.random_forest</h1><div class="highl
<span class="bp">self</span><span class="o">.</span><span class="n">_rf_opts</span><span class="o">.</span><span class="n">compute_law_of_total_variance</span> <span class="o">=</span> <span class="kc">False</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_rf</span><span class="p">:</span> <span class="n">BinaryForest</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_log_y</span> <span class="o">=</span> <span class="n">log_y</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_rng</span> <span class="o">=</span> <span class="n">regression</span><span class="o">.</span><span class="n">default_random_engine</span><span class="p">(</span><span class="n">seed</span><span class="p">)</span>

<span class="c1"># Case to `int` incase we get an `np.integer` type</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_rng</span> <span class="o">=</span> <span class="n">regression</span><span class="o">.</span><span class="n">default_random_engine</span><span class="p">(</span><span class="nb">int</span><span class="p">(</span><span class="n">seed</span><span class="p">))</span>

<span class="bp">self</span><span class="o">.</span><span class="n">_n_trees</span> <span class="o">=</span> <span class="n">n_trees</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_n_points_per_tree</span> <span class="o">=</span> <span class="n">n_points_per_tree</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ be applied to problems with large evaluation budgets (up to 1000 evaluations).
|
.. code-block:: default
.. code-block:: Python
import numpy as np
Expand Down Expand Up @@ -154,7 +154,7 @@ be applied to problems with large evaluation budgets (up to 1000 evaluations).
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 2.986 seconds)
**Total running time of the script:** (0 minutes 2.398 seconds)


.. _sphx_glr_download_examples_1_basics_1_quadratic_function.py:
Expand All @@ -163,20 +163,17 @@ be applied to problems with large evaluation budgets (up to 1000 evaluations).

.. container:: sphx-glr-footer sphx-glr-footer-example


.. container:: binder-badge

.. image:: images/binder_badge_logo.svg
:target: https://mybinder.org/v2/gh/automl/SMAC3/main?urlpath=lab/tree/notebooks/examples/1_basics/1_quadratic_function.ipynb
:alt: Launch binder
:width: 150 px

.. container:: sphx-glr-download sphx-glr-download-jupyter

:download:`Download Jupyter notebook: 1_quadratic_function.ipynb <1_quadratic_function.ipynb>`

.. container:: sphx-glr-download sphx-glr-download-python

:download:`Download Python source code: 1_quadratic_function.py <1_quadratic_function.py>`

.. container:: sphx-glr-download sphx-glr-download-jupyter

:download:`Download Jupyter notebook: 1_quadratic_function.ipynb <1_quadratic_function.ipynb>`
189 changes: 93 additions & 96 deletions development/_sources/examples/1_basics/2_svm_cv.rst.txt

Large diffs are not rendered by default.

25 changes: 10 additions & 15 deletions development/_sources/examples/1_basics/3_ask_and_tell.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,19 @@ This examples show how to use the Ask-and-Tell interface.
[INFO][abstract_intensifier.py:515] Added config 38310a as new incumbent because there are no incumbents yet.
[INFO][abstract_intensifier.py:594] Added config a840bc and rejected config 38310a as incumbent because it is not better than the incumbents on 1 instances:
[INFO][abstract_intensifier.py:594] Added config e8ddec and rejected config a840bc as incumbent because it is not better than the incumbents on 1 instances:
[INFO][abstract_intensifier.py:594] Added config a9b60d and rejected config e8ddec as incumbent because it is not better than the incumbents on 1 instances:
[INFO][abstract_intensifier.py:594] Added config 96f88f and rejected config a9b60d as incumbent because it is not better than the incumbents on 1 instances:
[INFO][abstract_intensifier.py:594] Added config 0d4e03 and rejected config 96f88f as incumbent because it is not better than the incumbents on 1 instances:
[INFO][abstract_intensifier.py:594] Added config e74ba7 and rejected config e8ddec as incumbent because it is not better than the incumbents on 1 instances:
[INFO][smbo.py:319] Finished 50 trials.
[INFO][abstract_intensifier.py:594] Added config 737ab9 and rejected config 0d4e03 as incumbent because it is not better than the incumbents on 1 instances:
[INFO][abstract_intensifier.py:594] Added config eeebb9 and rejected config 737ab9 as incumbent because it is not better than the incumbents on 1 instances:
[INFO][abstract_intensifier.py:594] Added config 6d9074 and rejected config eeebb9 as incumbent because it is not better than the incumbents on 1 instances:
[INFO][abstract_intensifier.py:594] Added config a0e706 and rejected config 6d9074 as incumbent because it is not better than the incumbents on 1 instances:
[INFO][abstract_intensifier.py:594] Added config 1eebbc and rejected config e74ba7 as incumbent because it is not better than the incumbents on 1 instances:
[INFO][abstract_intensifier.py:594] Added config f01c34 and rejected config 1eebbc as incumbent because it is not better than the incumbents on 1 instances:
[INFO][abstract_intensifier.py:594] Added config 1df946 and rejected config f01c34 as incumbent because it is not better than the incumbents on 1 instances:
[INFO][abstract_intensifier.py:594] Added config 535c5d and rejected config 1df946 as incumbent because it is not better than the incumbents on 1 instances:
[INFO][smbo.py:319] Finished 100 trials.
[INFO][smbo.py:327] Configuration budget is exhausted:
[INFO][smbo.py:328] --- Remaining wallclock time: inf
[INFO][smbo.py:329] --- Remaining cpu time: inf
[INFO][smbo.py:330] --- Remaining trials: 0
Default cost: 16916.0
Incumbent cost: 0.8499771879028607
Incumbent cost: 1.1183978687059386
Expand All @@ -59,7 +57,7 @@ This examples show how to use the Ask-and-Tell interface.
|
.. code-block:: default
.. code-block:: Python
from ConfigSpace import Configuration, ConfigurationSpace, Float
Expand Down Expand Up @@ -140,7 +138,7 @@ This examples show how to use the Ask-and-Tell interface.
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 3.533 seconds)
**Total running time of the script:** (0 minutes 2.636 seconds)


.. _sphx_glr_download_examples_1_basics_3_ask_and_tell.py:
Expand All @@ -149,20 +147,17 @@ This examples show how to use the Ask-and-Tell interface.

.. container:: sphx-glr-footer sphx-glr-footer-example


.. container:: binder-badge

.. image:: images/binder_badge_logo.svg
:target: https://mybinder.org/v2/gh/automl/SMAC3/main?urlpath=lab/tree/notebooks/examples/1_basics/3_ask_and_tell.ipynb
:alt: Launch binder
:width: 150 px

.. container:: sphx-glr-download sphx-glr-download-jupyter

:download:`Download Jupyter notebook: 3_ask_and_tell.ipynb <3_ask_and_tell.ipynb>`

.. container:: sphx-glr-download sphx-glr-download-python

:download:`Download Python source code: 3_ask_and_tell.py <3_ask_and_tell.py>`

.. container:: sphx-glr-download sphx-glr-download-jupyter

:download:`Download Jupyter notebook: 3_ask_and_tell.ipynb <3_ask_and_tell.ipynb>`
11 changes: 4 additions & 7 deletions development/_sources/examples/1_basics/4_callback.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Furthermore, we print some stages of the optimization process.
|
.. code-block:: default
.. code-block:: Python
from __future__ import annotations
Expand Down Expand Up @@ -146,7 +146,7 @@ Furthermore, we print some stages of the optimization process.
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 0.180 seconds)
**Total running time of the script:** (0 minutes 0.147 seconds)


.. _sphx_glr_download_examples_1_basics_4_callback.py:
Expand All @@ -155,20 +155,17 @@ Furthermore, we print some stages of the optimization process.

.. container:: sphx-glr-footer sphx-glr-footer-example


.. container:: binder-badge

.. image:: images/binder_badge_logo.svg
:target: https://mybinder.org/v2/gh/automl/SMAC3/main?urlpath=lab/tree/notebooks/examples/1_basics/4_callback.ipynb
:alt: Launch binder
:width: 150 px

.. container:: sphx-glr-download sphx-glr-download-jupyter

:download:`Download Jupyter notebook: 4_callback.ipynb <4_callback.ipynb>`

.. container:: sphx-glr-download sphx-glr-download-python

:download:`Download Python source code: 4_callback.py <4_callback.py>`

.. container:: sphx-glr-download sphx-glr-download-jupyter

:download:`Download Jupyter notebook: 4_callback.ipynb <4_callback.ipynb>`
11 changes: 4 additions & 7 deletions development/_sources/examples/1_basics/5_continue.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ there already is a previous run with the same meta data, this run will be contin
|
.. code-block:: default
.. code-block:: Python
from __future__ import annotations
Expand Down Expand Up @@ -170,7 +170,7 @@ there already is a previous run with the same meta data, this run will be contin
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 0.982 seconds)
**Total running time of the script:** (0 minutes 0.814 seconds)


.. _sphx_glr_download_examples_1_basics_5_continue.py:
Expand All @@ -179,20 +179,17 @@ there already is a previous run with the same meta data, this run will be contin

.. container:: sphx-glr-footer sphx-glr-footer-example


.. container:: binder-badge

.. image:: images/binder_badge_logo.svg
:target: https://mybinder.org/v2/gh/automl/SMAC3/main?urlpath=lab/tree/notebooks/examples/1_basics/5_continue.ipynb
:alt: Launch binder
:width: 150 px

.. container:: sphx-glr-download sphx-glr-download-jupyter

:download:`Download Jupyter notebook: 5_continue.ipynb <5_continue.ipynb>`

.. container:: sphx-glr-download sphx-glr-download-python

:download:`Download Python source code: 5_continue.py <5_continue.py>`

.. container:: sphx-glr-download sphx-glr-download-jupyter

:download:`Download Jupyter notebook: 5_continue.ipynb <5_continue.ipynb>`
19 changes: 8 additions & 11 deletions development/_sources/examples/1_basics/6_priors.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ optimization, you have to change the acquisition function to ``PriorAcquisitionF
[WARNING][prior_acqusition_function.py:107] Discretizing the prior for random forest models.
[INFO][abstract_intensifier.py:515] Added config 7ec7fe as new incumbent because there are no incumbents yet.
[INFO][abstract_intensifier.py:594] Added config 6acb23 and rejected config 7ec7fe as incumbent because it is not better than the incumbents on 1 instances:
[INFO][abstract_intensifier.py:594] Added config 95309e and rejected config 6acb23 as incumbent because it is not better than the incumbents on 1 instances:
[INFO][abstract_intensifier.py:594] Added config 87ba17 and rejected config 95309e as incumbent because it is not better than the incumbents on 1 instances:
[INFO][abstract_intensifier.py:594] Added config a3d1bd and rejected config 87ba17 as incumbent because it is not better than the incumbents on 1 instances:
[INFO][abstract_intensifier.py:594] Added config 37a8e7 and rejected config 6acb23 as incumbent because it is not better than the incumbents on 1 instances:
[INFO][abstract_intensifier.py:594] Added config 5b96ec and rejected config 37a8e7 as incumbent because it is not better than the incumbents on 1 instances:
[INFO][abstract_intensifier.py:594] Added config 35cf09 and rejected config 5b96ec as incumbent because it is not better than the incumbents on 1 instances:
[INFO][smbo.py:327] Configuration budget is exhausted:
[INFO][smbo.py:328] --- Remaining wallclock time: inf
[INFO][smbo.py:329] --- Remaining cpu time: inf
[INFO][smbo.py:330] --- Remaining trials: 0
Default cost: 0.038952336737852145
Default cost: 0.026719281956050667
Default cost: 0.02727174249458364
Expand All @@ -59,7 +59,7 @@ optimization, you have to change the acquisition function to ``PriorAcquisitionF
|
.. code-block:: default
.. code-block:: Python
import warnings
Expand Down Expand Up @@ -225,7 +225,7 @@ optimization, you have to change the acquisition function to ``PriorAcquisitionF
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 29.828 seconds)
**Total running time of the script:** (0 minutes 24.000 seconds)


.. _sphx_glr_download_examples_1_basics_6_priors.py:
Expand All @@ -234,20 +234,17 @@ optimization, you have to change the acquisition function to ``PriorAcquisitionF

.. container:: sphx-glr-footer sphx-glr-footer-example


.. container:: binder-badge

.. image:: images/binder_badge_logo.svg
:target: https://mybinder.org/v2/gh/automl/SMAC3/main?urlpath=lab/tree/notebooks/examples/1_basics/6_priors.ipynb
:alt: Launch binder
:width: 150 px

.. container:: sphx-glr-download sphx-glr-download-jupyter

:download:`Download Jupyter notebook: 6_priors.ipynb <6_priors.ipynb>`

.. container:: sphx-glr-download sphx-glr-download-python

:download:`Download Python source code: 6_priors.py <6_priors.py>`

.. container:: sphx-glr-download sphx-glr-download-jupyter

:download:`Download Jupyter notebook: 6_priors.ipynb <6_priors.ipynb>`
59 changes: 44 additions & 15 deletions development/_sources/examples/1_basics/sg_execution_times.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,47 @@

Computation times
=================
**00:38.526** total execution time for **examples_1_basics** files:

+-----------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_examples_1_basics_6_priors.py` (``6_priors.py``) | 00:29.828 | 0.0 MB |
+-----------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_examples_1_basics_3_ask_and_tell.py` (``3_ask_and_tell.py``) | 00:03.533 | 0.0 MB |
+-----------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_examples_1_basics_1_quadratic_function.py` (``1_quadratic_function.py``) | 00:02.986 | 0.0 MB |
+-----------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_examples_1_basics_2_svm_cv.py` (``2_svm_cv.py``) | 00:01.017 | 0.0 MB |
+-----------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_examples_1_basics_5_continue.py` (``5_continue.py``) | 00:00.982 | 0.0 MB |
+-----------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_examples_1_basics_4_callback.py` (``4_callback.py``) | 00:00.180 | 0.0 MB |
+-----------------------------------------------------------------------------------------+-----------+--------+
**00:30.783** total execution time for 6 files **from examples/1_basics**:

.. container::

.. raw:: html

<style scoped>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.3.0/css/bootstrap.min.css" rel="stylesheet" />
<link href="https://cdn.datatables.net/1.13.6/css/dataTables.bootstrap5.min.css" rel="stylesheet" />
</style>
<script src="https://code.jquery.com/jquery-3.7.0.js"></script>
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.13.6/js/dataTables.bootstrap5.min.js"></script>
<script type="text/javascript" class="init">
$(document).ready( function () {
$('table.sg-datatable').DataTable({order: [[1, 'desc']]});
} );
</script>

.. list-table::
:header-rows: 1
:class: table table-striped sg-datatable

* - Example
- Time
- Mem (MB)
* - :ref:`sphx_glr_examples_1_basics_6_priors.py` (``6_priors.py``)
- 00:24.000
- 0.0
* - :ref:`sphx_glr_examples_1_basics_3_ask_and_tell.py` (``3_ask_and_tell.py``)
- 00:02.636
- 0.0
* - :ref:`sphx_glr_examples_1_basics_1_quadratic_function.py` (``1_quadratic_function.py``)
- 00:02.398
- 0.0
* - :ref:`sphx_glr_examples_1_basics_5_continue.py` (``5_continue.py``)
- 00:00.814
- 0.0
* - :ref:`sphx_glr_examples_1_basics_2_svm_cv.py` (``2_svm_cv.py``)
- 00:00.788
- 0.0
* - :ref:`sphx_glr_examples_1_basics_4_callback.py` (``4_callback.py``)
- 00:00.147
- 0.0
Loading

0 comments on commit ce522f5

Please sign in to comment.