@@ -63,6 +63,7 @@ def setUp(self) -> None:
6363 mdd = np .array ([0 , 10 * slope ]),
6464 paa = np .ones (2 ),
6565 id = 1 ,
66+ haz_type = "TEST" ,
6667 )
6768 ]
6869 )
@@ -106,6 +107,7 @@ def test_multiple_constrained(self):
106107 mdd = np .array ([0 , 1 , 3 ]),
107108 paa = np .ones (3 ),
108109 id = 1 ,
110+ haz_type = "TEST" ,
109111 )
110112 ]
111113 )
@@ -155,6 +157,7 @@ def setUp(self) -> None:
155157 mdd = np .array ([0 , 10 * slope ]),
156158 paa = np .ones (2 ),
157159 id = 1 ,
160+ haz_type = "TEST" ,
158161 )
159162 ]
160163 )
@@ -170,8 +173,8 @@ def setUp(self) -> None:
170173 def test_single (self ):
171174 """Test with single parameter"""
172175 self .input .bounds = {"slope" : (- 1 , 3 )}
173- optimizer = BayesianOptimizer (self .input )
174- output = optimizer .run (init_points = 10 , n_iter = 20 , random_state = 1 )
176+ optimizer = BayesianOptimizer (self .input , random_state = 1 )
177+ output = optimizer .run (init_points = 10 , n_iter = 20 )
175178
176179 # Check result (low accuracy)
177180 self .assertAlmostEqual (output .params ["slope" ], 1.0 , places = 2 )
@@ -189,6 +192,7 @@ def test_multiple_constrained(self):
189192 mdd = np .array ([0 , 1 , 3 ]),
190193 paa = np .ones (3 ),
191194 id = 1 ,
195+ haz_type = "TEST" ,
192196 )
193197 ]
194198 )
@@ -199,8 +203,8 @@ def test_multiple_constrained(self):
199203 )
200204 self .input .bounds = {"intensity_1" : (- 1 , 4 ), "intensity_2" : (- 1 , 4 )}
201205 # Run optimizer
202- optimizer = BayesianOptimizer (self .input )
203- output = optimizer .run (n_iter = 200 , random_state = 1 )
206+ optimizer = BayesianOptimizer (self .input , random_state = 1 )
207+ output = optimizer .run (n_iter = 200 )
204208
205209 # Check results (low accuracy)
206210 self .assertEqual (output .p_space .dim , 2 )
@@ -230,8 +234,8 @@ def test_multiple_constrained(self):
230234 def test_plots (self ):
231235 """Check if executing the default plots works"""
232236 self .input .bounds = {"slope" : (- 1 , 3 )}
233- optimizer = BayesianOptimizer (self .input )
234- output = optimizer .run (init_points = 10 , n_iter = 20 , random_state = 1 )
237+ optimizer = BayesianOptimizer (self .input , random_state = 1 )
238+ output = optimizer .run (init_points = 10 , n_iter = 20 )
235239
236240 output_eval = OutputEvaluator (self .input , output )
237241 output_eval .impf_set .plot ()
0 commit comments