Skip to content

Commit ec74332

Browse files
committed
TST/CI: Fix curious test_estimator_factory failing on CI
1 parent 3b3c785 commit ec74332

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sambo/_test.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,15 @@ def test_our_params_match_scipy_optimize_params(self):
318318
class TestSklearnEstimators(unittest.TestCase):
319319
def test_estimator_factory(self):
320320
DEFAULT_KWARGS = {'max_iter': 20, 'n_iter_no_change': 5, 'rng': 0}
321+
ESTIMATOR_KWARGS = {
322+
'gp': {},
323+
'et': {'max_iter': 40, 'n_iter_no_change': 10},
324+
'gb': {},
325+
}
321326
for estimator in BUILTIN_ESTIMATORS:
322327
with self.subTest(estimator=estimator):
323328
res = smbo(lambda x: sum((x-2)**2), bounds=[(-100, 100)], estimator=estimator,
324-
**dict(DEFAULT_KWARGS))
329+
**dict(DEFAULT_KWARGS, **ESTIMATOR_KWARGS[estimator]))
325330
self.assertLess(res.fun, 1, msg=res)
326331

327332
def test_SamboSearchCV_large_param_grid(self):

0 commit comments

Comments
 (0)