def test_passes():
"""[Model Selection] Test sets error score on failed scoring."""
evl = Evaluator(bad_scorer, error_score=0, n_jobs=1, verbose=5)
with open(os.devnull, 'w') as f, redirect_stdout(f):
evl = np.testing.assert_warns(FitFailedWarning,
evl.fit, X, y,
estimators=[OLS()],
param_dicts={'ols':
{'offset': randint(1, 10)}},
n_iter=1)
assert evl.results['test_score-m']['ols'] == 0
评论列表
文章目录