From 262c211fc051a50fc38ecaa2d771856ecd5c5856 Mon Sep 17 00:00:00 2001 From: Paul-Saves Date: Tue, 28 Nov 2023 23:13:06 +0100 Subject: [PATCH 1/3] update to ConfigSpace 0.7 --- requirements.txt | 2 +- smt/utils/design_space.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index b0b9ac9a7..9df7456c4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,4 +8,4 @@ matplotlib # used in examples and tests pytest # tests runner pytest-xdist # allows running parallel testing with pytest -n black # check code format -ConfigSpace~=0.6.1 \ No newline at end of file +ConfigSpace~=0.7.1 \ No newline at end of file diff --git a/smt/utils/design_space.py b/smt/utils/design_space.py index 3b9458d89..d8127d327 100644 --- a/smt/utils/design_space.py +++ b/smt/utils/design_space.py @@ -23,7 +23,7 @@ ForbiddenInClause, ForbiddenAndConjunction, ) - from ConfigSpace.exceptions import ForbiddenValueError + from ConfigSpace.exceptions import ForbiddenValueError, InactiveHyperparameter from ConfigSpace.util import get_random_neighbor HAS_CONFIG_SPACE = True @@ -967,9 +967,9 @@ def _get_correct_config(self, vector: np.ndarray) -> Configuration: config.is_valid_configuration() return config - except ValueError as e: + except Exception as e: error_str = str(e) - if "Inactive hyperparameter" in error_str: + if isinstance(e, InactiveHyperparameter): # Deduce which parameter is inactive inactive_param_name = error_str.split("'")[1] param_idx = self._cs.get_idx_by_hyperparameter_name( From 571d7bf5b7a6bb065f2e518b1618126df28ecac2 Mon Sep 17 00:00:00 2001 From: Paul-Saves Date: Wed, 29 Nov 2023 21:25:04 +0100 Subject: [PATCH 2/3] update setup.py --- setup.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index cf2c03245..954d1b99d 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,10 @@ """ -Author: Dr. John T. Hwang - Dr. Mohamed A. Bouhlel +Author: John T. Hwang + Mohamed A. Bouhlel Remi Lafage Lucas Alber - + Paul Saves + This package is distributed under New BSD license. """ from setuptools import setup, Extension @@ -90,8 +91,8 @@ version=__version__, description="The Surrogate Modeling Toolbox (SMT)", long_description=LONG_DESCRIPTION, - author="Mohamed Amine Bouhlel et al.", - author_email="mbouhlel@umich.edu", + author="Remi Lafage et al.", + author_email="remi.lafage@onera.fr", license="BSD-3", classifiers=[_f for _f in CLASSIFIERS.split("\n") if _f], packages=[ @@ -113,10 +114,10 @@ "numba~=0.56.4", ], "cs": [ # pip install smt[cs] - "ConfigSpace~=0.6.1", + "ConfigSpace~=0.7.1", ], }, - python_requires=">=3.7", + python_requires=">=3.8", zip_safe=False, ext_modules=ext, url="https://github.com/SMTorg/smt", # use the URL to the github repo From 40562b43b5a07b92bb5c17cf0a324847c1e1a3e2 Mon Sep 17 00:00:00 2001 From: Paul-Saves Date: Thu, 30 Nov 2023 00:52:05 +0100 Subject: [PATCH 3/3] test --- smt/utils/design_space.py | 19 +-- smt/utils/test/test_design_space.py | 24 +++- .../NotebookRunTestCases_Paper_SMT_v2.ipynb | 117 ++++++++++++++++-- 3 files changed, 137 insertions(+), 23 deletions(-) diff --git a/smt/utils/design_space.py b/smt/utils/design_space.py index d8127d327..8f48d4246 100644 --- a/smt/utils/design_space.py +++ b/smt/utils/design_space.py @@ -1,5 +1,5 @@ """ -Author: Jasper Bussemaker +Author: Jasper Bussemaker , Paul Saves This package is distributed under New BSD license. """ @@ -23,7 +23,10 @@ ForbiddenInClause, ForbiddenAndConjunction, ) - from ConfigSpace.exceptions import ForbiddenValueError, InactiveHyperparameter + from ConfigSpace.exceptions import ( + ForbiddenValueError, + InactiveHyperparameterSetError, + ) from ConfigSpace.util import get_random_neighbor HAS_CONFIG_SPACE = True @@ -891,7 +894,6 @@ def _correct_get_acting(self, x: np.ndarray) -> Tuple[np.ndarray, np.ndarray]: if self._cs is not None: # Normalize value according to what ConfigSpace expects self._normalize_x(x) - # Get corrected Configuration objects by mapping our design vectors to the ordering of the ConfigurationSpace inv_cs_var_idx = self._inv_cs_var_idx configs = [] @@ -956,8 +958,8 @@ def _sample_valid_x( return self.correct_get_acting(x) def _get_correct_config(self, vector: np.ndarray) -> Configuration: + config = Configuration(self._cs, vector=vector) - # Unfortunately we cannot directly ask which parameters SHOULD be active # https://github.com/automl/ConfigSpace/issues/253#issuecomment-1513216665 # Therefore, we temporarily fix it with a very dirty workaround: catch the error raised in check_configuration @@ -969,15 +971,16 @@ def _get_correct_config(self, vector: np.ndarray) -> Configuration: except Exception as e: error_str = str(e) - if isinstance(e, InactiveHyperparameter): + if isinstance(e, InactiveHyperparameterSetError): # Deduce which parameter is inactive - inactive_param_name = error_str.split("'")[1] + inactive_param_name = (error_str.split("\n")[1]).split(",")[0] param_idx = self._cs.get_idx_by_hyperparameter_name( inactive_param_name - ) - + )+1 # Modify the vector and create a new Configuration vector = config.get_array().copy() + while str(vector[param_idx]) =="nan" : + param_idx=param_idx+1 vector[param_idx] = np.nan config = Configuration(self._cs, vector=vector) diff --git a/smt/utils/test/test_design_space.py b/smt/utils/test/test_design_space.py index f6fff1a0b..21f6d8570 100644 --- a/smt/utils/test/test_design_space.py +++ b/smt/utils/test/test_design_space.py @@ -201,7 +201,7 @@ def test_design_space(self): ) self.assertEqual(len(ds.design_variables), 4) if HAS_CONFIG_SPACE: - self.assertEqual(len(ds._cs.get_hyperparameters()), 4) + self.assertEqual(len(list(ds._cs.values())), 4) self.assertTrue(np.all(~ds.is_conditionally_acting)) if HAS_CONFIG_SPACE: x, is_acting = ds.sample_valid_x(3, random_state=42) @@ -538,7 +538,25 @@ def _is_conditionally_acting(self) -> np.ndarray: self.assertRaises( RuntimeError, lambda: ds.sample_valid_x(10, random_state=42) ) - + def test_check_conditionally_acting_2(self): + + for simulate_no_cs in [True, False]: + with simulate_no_config_space(simulate_no_cs): + ds = DesignSpace( + [ + CategoricalVariable(["A", "B", "C"]), # x0 + CategoricalVariable(["E", "F"]), # x1 + IntegerVariable(0, 1), # x2 + FloatVariable(0, 1), # x3 + ], + seed=42, + ) + ds.declare_decreed_var( + decreed_var=0, meta_var=1, meta_value="E" + ) # Activate x3 if x0 == A + + ds.sample_valid_x(10, random_state=42) + @unittest.skipIf( not HAS_CONFIG_SPACE, "Hierarchy ConfigSpace dependency not installed" ) @@ -549,7 +567,7 @@ def test_restrictive_value_constraint(self): IntegerVariable(0, 2), ] ) - assert ds._cs.get_hyperparameters()[0].default_value == 1 + assert list(ds._cs.values())[0].default_value == 1 ds.add_value_constraint(var1=0, value1=1, var2=0, value2=1) ds.sample_valid_x(100, random_state=42) diff --git a/tutorial/NotebookRunTestCases_Paper_SMT_v2.ipynb b/tutorial/NotebookRunTestCases_Paper_SMT_v2.ipynb index 1634beb30..91b38bb90 100644 --- a/tutorial/NotebookRunTestCases_Paper_SMT_v2.ipynb +++ b/tutorial/NotebookRunTestCases_Paper_SMT_v2.ipynb @@ -57,7 +57,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "fff43855", "metadata": {}, "outputs": [], @@ -125,10 +125,19 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "id": "ccc49c3b", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pred_RMSE on the training points 1.0052501496058814e-12\n", + "Var_RMSE on the training points 1.6419278095185747e-12\n" + ] + } + ], "source": [ "def f_neu(x1, x2, x3):\n", " return 2 * x1 + x2 - 0.5 * x3\n", @@ -202,10 +211,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "id": "9fc88694", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[1.3098127 0.69714044 2.19224095] [1.3098127 0.69714044 2.19224095]\n", + "The outputs must be similar (inactive variables have no effect) 0.0\n", + "[-1.39420965] [10.45248007]\n", + "The outputs must be different (active variables have effect) 11.846689716902546\n" + ] + } + ], "source": [ "#To check of some inactive variables have no effect on the output\n", "xv1=np.array([\n", @@ -234,10 +254,22 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "id": "c122b735", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Activation function ['ISRLU', 'SELU', 'ReLU ']\n", + "Batch size [3, 4, 5]\n", + "Number of hidden neurons -1st layer [2, 2, 2]\n", + "Number of hidden neurons -2nd layer [0, 1, 1]\n", + "Number of hidden neurons -3rd layer [0, 0, 5]\n" + ] + } + ], "source": [ "#To have access to the \"real\" values of the input space variables\n", "x2_decoded = design_space.decode_values(xv1, i_dv=2)\n", @@ -295,10 +327,29 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "id": "1b3c3727", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[33mWARNING: Ignoring invalid distribution -umpy (/stck/psaves/miniconda3/lib/python3.8/site-packages)\u001b[0m\u001b[33m\n", + "\u001b[0mName: numba\n", + "Version: 0.58.1\n", + "Summary: compiling Python code using LLVM\n", + "Home-page: https://numba.pydata.org\n", + "Author: \n", + "Author-email: \n", + "License: BSD\n", + "Location: /stck/psaves/miniconda3/lib/python3.8/site-packages\n", + "Requires: importlib-metadata, llvmlite, numpy\n", + "Required-by: \n", + "Numba used or not in your environment= %USE_NUMBA_JIT%\n" + ] + } + ], "source": [ "#to check if numba is available\n", "!pip show numba\n", @@ -308,15 +359,57 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "id": "b2d505b5", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Design space:\n", + "x0: Cat [0, 1, 2, 3]\n", + "x1: Ord [0, 1]\n", + "x2: Float (0, 100)\n", + "x3: Float (0, 100)\n", + "x4: Float (0, 100)\n", + "x5: Float (0, 100)\n", + "x6: Float (0, 100)\n", + "x7: Int (0, 2)\n", + "x8: Int (0, 2)\n", + "x9: Int (0, 2)\n", + "x10: Int (0, 2)\n", + "for 15 points time is = 0.0018038749694824219\n" + ] + }, + { + "ename": "IndexError", + "evalue": "index 11 is out of bounds for axis 0 with size 11", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mInactiveHyperparameterSetError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m~/smt/smt/utils/design_space.py\u001b[0m in \u001b[0;36m_get_correct_config\u001b[0;34m(self, vector)\u001b[0m\n\u001b[1;32m 968\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 969\u001b[0;31m \u001b[0mconfig\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mis_valid_configuration\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 970\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mconfig\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/miniconda3/lib/python3.8/site-packages/ConfigSpace/configuration.py\u001b[0m in \u001b[0;36mis_valid_configuration\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 128\u001b[0m \"\"\"\n\u001b[0;32m--> 129\u001b[0;31m c_util.check_configuration(\n\u001b[0m\u001b[1;32m 130\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mconfig_space\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/miniconda3/lib/python3.8/site-packages/ConfigSpace/c_util.pyx\u001b[0m in \u001b[0;36mConfigSpace.c_util.check_configuration\u001b[0;34m()\u001b[0m\n", + "\u001b[0;32m~/miniconda3/lib/python3.8/site-packages/ConfigSpace/c_util.pyx\u001b[0m in \u001b[0;36mConfigSpace.c_util.check_configuration\u001b[0;34m()\u001b[0m\n", + "\u001b[0;31mInactiveHyperparameterSetError\u001b[0m: Hyperparameter is inactive but has a value set as 0.5.\nx8, Type: UniformInteger, Range: [0, 2], Default: 1", + "\nDuring handling of the above exception, another exception occurred:\n", + "\u001b[0;31mIndexError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m/tmp/ipykernel_3462256/3677463211.py\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 11\u001b[0m \u001b[0mend\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtime\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtime\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 12\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"for \"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mn_doe\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"points time is = \"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mend\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0mstart\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 13\u001b[0;31m \u001b[0mYt1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mproblem\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mXt1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 14\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 15\u001b[0m \u001b[0;31m#for 150 points\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/smt/smt/problems/problem.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, x, kx)\u001b[0m\n\u001b[1;32m 109\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 110\u001b[0m \u001b[0;31m# Correct the design vector and get information about which design variables are active\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 111\u001b[0;31m \u001b[0mx_corr\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0meval_is_acting\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdesign_space\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcorrect_get_acting\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 112\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0meval_x\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mx_corr\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 113\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/smt/smt/utils/design_space.py\u001b[0m in \u001b[0;36mcorrect_get_acting\u001b[0;34m(self, x)\u001b[0m\n\u001b[1;32m 273\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 274\u001b[0m \u001b[0;31m# Correct and get the is_acting matrix\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 275\u001b[0;31m \u001b[0mx_corrected\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mis_acting\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_correct_get_acting\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 276\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 277\u001b[0m \u001b[0;31m# Check conditionally-acting status\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/smt/smt/utils/design_space.py\u001b[0m in \u001b[0;36m_correct_get_acting\u001b[0;34m(self, x)\u001b[0m\n\u001b[1;32m 899\u001b[0m \u001b[0mconfigs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 900\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mxi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 901\u001b[0;31m \u001b[0mconfigs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_correct_config\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mxi\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0minv_cs_var_idx\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 902\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 903\u001b[0m \u001b[0;31m# Convert Configuration objects to design vectors and get the is_active matrix\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/smt/smt/utils/design_space.py\u001b[0m in \u001b[0;36m_get_correct_config\u001b[0;34m(self, vector)\u001b[0m\n\u001b[1;32m 980\u001b[0m \u001b[0;31m# Modify the vector and create a new Configuration\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 981\u001b[0m \u001b[0mvector\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mconfig\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_array\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 982\u001b[0;31m \u001b[0;32mwhile\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvector\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mparam_idx\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m==\u001b[0m\u001b[0;34m\"nan\"\u001b[0m \u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 983\u001b[0m \u001b[0mparam_idx\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mparam_idx\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 984\u001b[0m \u001b[0mvector\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mparam_idx\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mnan\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mIndexError\u001b[0m: index 11 is out of bounds for axis 0 with size 11" + ] + } + ], "source": [ "#compare the CPU time to build a DOE with 15 or 150 points\n", "problem = HierarchicalGoldstein()\n", "design_space = problem.design_space\n", - "\n", + "print(design_space)\n", "#for 15 points\n", "n_doe = 15\n", "design_space.seed = 42\n",