MachineLearningNotebooks icon indicating copy to clipboard operation
MachineLearningNotebooks copied to clipboard

Azure Machine Learning error: Can not use 'XGBoostClassifier'

Open waltz2u opened this issue 6 years ago • 8 comments

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)

waltz2u avatar Feb 06 '20 14:02 waltz2u

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

cartacioS avatar Feb 11 '20 23:02 cartacioS

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!

jialiu103 avatar Feb 12 '20 21:02 jialiu103

@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

cartacioS avatar Feb 13 '20 01:02 cartacioS

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?

cartacioS avatar Feb 18 '20 21:02 cartacioS

Hi @cartacioS and @jialiu103, sorry for the late reply. Yes it works now for me. Thank you very much.

CD

waltz2u avatar Feb 19 '20 21:02 waltz2u

Will now proceed to close this thread. Thanks.

GiftA-MSFT avatar Mar 10 '20 18:03 GiftA-MSFT

@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 avatar Mar 13 '20 21:03 jadhosn

@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.

cartacioS avatar Apr 22 '20 17:04 cartacioS