Azure / MachineLearningNotebooks

Python notebooks with ML and deep learning examples with Azure Machine Learning Python SDK | Microsoft
https://docs.microsoft.com/azure/machine-learning/service/
MIT License
4.07k stars 2.52k forks source link

Azure AutoML, model inference issue: XGBoost 'XGBClassifier' object has no attribute 'enable_categorical' #1844

Closed nabil-fcbqa closed 1 year ago

nabil-fcbqa commented 1 year ago

Hello,

After training an AutoML model using the AutoMLStep, I retrieved the model using the following approach:

automl_run = AutoMLRun(remote_run.experiment, run_id=automl_step_id)
best_run, best_model = automl_run.get_output()

And then tried to call the predict_proba() method on the model which yields the following error:

azureml.automl.core.shared.exceptions.PredictionException: PredictionException:
    Message: 'XGBClassifier' object has no attribute 'enable_categorical'
    InnerException: AttributeError: 'XGBClassifier' object has no attribute 'enable_categorical'

I am using the latest version of XGBoost so this doesn't like a version issue. Not much can be found about version compatibilities with trained models using AutoML in Microsoft's doc either.

Thanks for your help.