How to deploy an AutoML model to an online endpoint
In this article, you'll learn how to deploy an AutoML-trained machine learning model to an online (real-time inference) endpoint. Automated machine learning, also referred to as automated ML or AutoML, is the process of automating the time-consuming, iterative tasks of developing a machine learning model. For more, see What is automated machine learning (AutoML)?.
In this article you'll know how to deploy AutoML trained machine learning model to online endpoints using:
- Azure Machine Learning studio
- Azure Machine Learning CLI v2
- Azure Machine Learning Python SDK v2
An AutoML-trained machine learning model. For more, see Tutorial: Train a classification model with no-code AutoML in the Azure Machine Learning studio or Tutorial: Forecast demand with automated machine learning.
Deploy from Azure Machine Learning studio and no code
Deploying an AutoML-trained model from the Automated ML page is a no-code experience. That is, you don't need to prepare a scoring script and environment, both are auto generated.
Go to the Automated ML page in the studio
Select your experiment and run
Choose the Models tab
Select the model you want to deploy
Once you select a model, the Deploy button will light up with a drop-down menu
Select Deploy to real-time endpoint option
The system will generate the Model and Environment needed for the deployment.
Complete the wizard to deploy the model to an online endpoint
Deploy manually from the studio or command line
If you wish to have more control over the deployment, you can download the training artifacts and deploy them.
To download the components you'll need for deployment:
- Go to your Automated ML experiment and run in your machine learning workspace
- Choose the Models tab
- Select the model you wish to use. Once you select a model, the Download button will become enabled
- Choose Download
You'll receive a zip file containing:
- A conda environment specification file named
- A Python scoring file named
- The model itself, in a Python
To deploy using these files, you can use either the studio or the Azure CLI.
Go to the Models page in Azure Machine Learning studio
Select + Register Model option
Register the model you downloaded from Automated ML run
Go to Environments page, select Custom environment, and select + Create option to create an environment for your deployment. Use the downloaded conda yaml to create a custom environment
Select the model, and from the Deploy drop-down option, select Deploy to real-time endpoint
Complete all the steps in wizard to create an online endpoint and deployment