scikit-optimize icon indicating copy to clipboard operation
scikit-optimize copied to clipboard

BayesSearchCV callback error

Open shellover opened this issue 4 years ago • 3 comments

[Progress monitoring and control using callback argument of fit method example in this binder works OK - https://mybinder.org/v2/gh/scikit-optimize/scikit-optimize/a2369ddbc332d16d8ff173b12404b03fea472492?urlpath=lab%2Ftree%2Fnotebooks%2Fauto_examples%2Fsklearn-gridsearchcv-replacement.ipynb]

When I try to run the Progress monitoring and control example on my computer using SKopt 0.9.0 and Sklearn 1.0.1, the callback fails. Implementing a debugger, searchcv has the following Attribute Error

*** AttributeError: 'BayesSearchCV' object has no attribute 'best_score_'

shellover avatar Nov 15 '21 21:11 shellover

still the same error in '0.9.0' version. Please, fix it!

1vash avatar Apr 26 '22 14:04 1vash

Also having the same issue - any updates here please?

finlytics-hub avatar Apr 16 '23 16:04 finlytics-hub

Same issue here.

def on_step(optim_result):
    score = opt.best_score_
    print("best score: %s" % score)
    if score >= 0.95:
        print('Interrupting!')
        return True

opt.fit(X, y, callback = on_step)

davidchung-hifranc avatar Aug 29 '23 11:08 davidchung-hifranc