Deploying your model to production

The final interesting piece of Azure Machine Learning is the deployment tooling that is included with it. The deployment tooling allows you to take a model from the model registry and deploy it to production.

Before you can deploy a model to production, you need to have an image that includes the model and a scoring script. The image is a Docker image that includes a web server, which will invoke the scoring script when a request is made against it. The scoring script accepts input in the form of a JSON payload, and uses it to make a prediction using the model. The scoring script for our iris classification model looks like this:

import osimport jsonimport numpy as npfrom azureml.core.model import Model ...

Get Deep Learning with Microsoft Cognitive Toolkit Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.