Algorithmia enables data science teams to deploy models from many different model training platforms, including Amazon SageMaker. SageMaker provides different components such as notebooks and training jobs that enable developers and data scientists to build and train machine learning models.

Training Systems to Algorithmia Overview

The ability to deploy from many different training environments to Algorithmia lets data scientists use their preferred development tools and existing model training platforms. Algorithmia provides a centralized model catalog and handles the scaling, governance, and operations.

Model deployment workflow

Once you’ve trained your model in SageMaker and are ready to deploy it to Algorithmia, the process is as simple as building and publishing a new version of your algorithm.

When you publish a new version of your algorithm, Algorithmia packages up your model serving function and its dependencies, creates a REST API for your algorithm, and deploys a containerized version of your algorithm to autoscaling infrastructure.

SageMaker to Algorithmia Overview

Once your algorithm is published, Algorithmia handles the serving, monitoring, scaling, and governance of your algorithm in a centralized model catalog.

Each algorithm includes auto-generated code snippets that can be used to call models that have been published to Algorithmia. Application developers can use any of the Algorithmia language clients to integrate your model into consuming applications such as a customer-facing website, mobile application, or visual dashboard.

Considerations before deployment

Because SageMaker consists of many different components, it’s important to consider the steps in your model training process, which will determine your workflow for deploying models to Algorithmia.

  • Which SageMaker component(s) will you use to train your model?

  • Which language will your algorithm be using?

  • Which format will you use to serialize your trained model?

  • Where will you store your trained model?

Based on the answers to these questions, you can develop a workflow to deploy models from SageMaker to Algorithmia. Although there are many possible options, the following sections describe two common workflows for deploying models from SageMaker to Algorithmia.

Example workflow 1: Deploying models from SageMaker Notebooks

SageMaker Notebooks enable you to use Python or R to build and train models using machine learning frameworks such as TensorFlow and PyTorch, which are fully supported by Algorithmia.

When using this workflow, once you’ve trained your model, you can upload the trained model to Hosted Data Storage in Algorithmia (or a variety of other data sources) directly from a Jupyter Notebook, which can then be loaded into Algorithmia and served in production.

Deploying from SageMaker Notebooks

The steps for this example workflow can be summarized as:

  1. Build and train your model in SageMaker Notebooks

  2. Save your trained model to Hosted Data Storage in Algorithmia

  3. Create and build a new algorithm

  4. Publish your algorithm

  5. Integrate your algorithm into consuming applications using the language clients in Algorithmia

Refer to the article on deploying your models from Jupyter Notebooks and the documentation on working with data in hosted storage for more detailed information on the steps involved in this workflow.

Although this workflow involves the use of Hosted Data Storage, you can connect to other data sources such as Amazon S3 using the Data Portal in Algorithmia.

Example workflow 2: Deploying models from SageMaker training jobs

In addition to notebooks, SageMaker provides other components such as training jobs that can be used to build and train your models.

When using this workflow, once a training job is complete, the trained model is then uploaded to Amazon S3, which can then be loaded into Algorithmia and served in production.

Deploying from SageMaker Training Systems

The steps for this example workflow can be summarized as:

  1. Build and train your model using a training job in SageMaker

  2. Save your trained model to Amazon S3

  3. Create and build a new algorithm

  4. Publish your algorithm

  5. Integrate your algorithm into consuming applications using the language clients in Algorithmia

Refer to the Algorithmia documentation on working with data in Amazon S3 for more detailed information on the steps involved in this workflow.

Summary

The example workflows described here allow you to build and train models in Jupyter Notebooks or training jobs, which can then be loaded into Algorithmia and served in production. These workflows represent two of many possible options for deploying models from SageMaker to Algorithmia, and you can adapt these workflows to specific components in your training pipeline.

Algorithmia makes it easy to move models from development to production by integrating with SageMaker and other training platforms that your data scientists are using today. This flexibility allows you to deploy models to Algorithmia from various training environments without burdening your data scientists with infrastructure details and without locking in or limiting your model deployment pipeline to specific training platforms or tools.

Kristopher Overholt