Open scigeek72 opened 1 year ago
I am having the same issue!
I had similar issues: I had depreciated use of np.int and then the same AttributeError as you
In the file skopt/space/tranformers.py go to
line 275. Change np.int to int or int64 in return np.round(X_orig).astype(int)
line 290. To remove the check manually, I commented out this entire block:
for transformer in self.transformers:
if not isinstance(transformer, Transformer):
raise ValueError(
"Provided transformers should be a Transformer "
"instance. Got %s" % transformer
)
Hopefully gp_minimize keeps ticking along with some development. All available high-level Bayesian Optimisers do the exact same thing so I don't really want to switch all my code.
I am trying to tune the hyperparameters for a xgboost classifier. The target is binary (0/1) and the training set is all numerical. When I am trying to run
gp_minimize()
, I am getting the following error: Provided transformers should be a Transformer instance. Got <skopt.space.transformers.Identity object. Below is my code (basically a verbatim copy of the example provided in the skopt documentation except I am trying out a xgboost classifier ) that I am trying to use:Below is the traceback to help with the understanding of the issue I am facing:
I couldn't figure out what is wrong and there isn't any stackoverflow topic on this particular issue.