Azure Machine Learning error: Can not use 'XGBoostClassifier'
I got this error with Azure Machine Learning.
ConfigException: ConfigException: Message: blacklisted and whitelisted models are exactly the same. Found: {'XGBoostClassifier'}.Please remove models from the blacklist or add models to the whitelist.
The settings are as follow. 'XGBoostClassifier' is in the whitelist; and backlist is None. Would you please help with the error?
automl_settings = { "iteration_timeout_minutes": 2, "experiment_timeout_minutes": 20, "enable_early_stopping": True, "primary_metric": 'accuracy', "featurization": 'auto', "verbosity": logging.INFO, "n_cross_validations": 5 }
from azureml.train.automl import AutoMLConfig
automl_config = AutoMLConfig(task='classification', enable_tf = True, debug_log='automated_ml_errors.log', X=x_train.values, y=y_train.values.flatten(), blacklist_models = None, whitelist_models = ['XGBoostClassifier'], **automl_settings)
(Note: XGBoostClassifier was installed in the notebook)
Hello,
We're so sorry you've encountered this issue. I've gone ahead and filed a work item to investigate and fix the issue around whitelisting XGBoost. We will reach out again here once a fix is in.
Thank you, Sabina
It could be possible that XGBoostClassifier was blacklisted by the system. We can double check if you can share your runId. In the meanwhile, we will improve the error msg for this scenario. Thanks!
@waltz2u Can you please run the following line of code in your jupyter notebook and let me know what it says?
import xgboost
Thanks, Sabina
Hi @waltz2u, I was able to reproduce and overcome this issue by double checking that import xgboost was installed correctly by trying import xgboost.
pip install "py-xgboost<=0.80" fixed it on my end. Can you please try that and let us know if it solved the issue?
Hi @cartacioS and @jialiu103, sorry for the late reply. Yes it works now for me. Thank you very much.
CD
Will now proceed to close this thread. Thanks.
@cartacioS I'm facing the same error, except that I'm kicking off the AutoML run from my local machine, using a remote compute as my aml compute target. Using this issue above, and this one, it seems that I would still need to add xgboost to my env (locally) although technically I won't be using that package in my AutoML exercise?
@jadhosn If you do not require XGBoost for your training, you can simply ignore this warning. But if you want XGBoost to be a potential recommended model, then yes you will need to add XGBoost to your local environment regardless of local/remote compute.