Custom SageMaker model Inference

Ezsmdeploy python SDK helps you easily deploy Machine learning models and provides a rich set of features such as passing one or more model files (yes, through multi-model deployments), automatically choosing an instance based on model size or based on a budget, and load testing endpoints using an intuitive API. Ezsmdeploy uses the SageMaker Python SDK, which is an open source library for training and deploying machine learning models on Amazon SageMaker.

Installing the Ezsmdeploy Python SDK

pip install ezsmdeploy

Key Features

At minimum, ezsmdeploy requires you to provide:

one or more model files a python script with two functions:

  1. load_model(modelpath) - loads a model from a modelpath and returns a model object, and
  2. predict(model,input) - performs inference based on a model object and input data a list of requirements or a requirements.txt file

For example, you can do this to deploy a pytorch model:

import ezsmdeploy

ezonsm = ezsmdeploy.Deploy(model = 'model.pth',
              script = '',
              requirements = ['numpy','torch','joblib'])

Read more about the ezsmdeploy SDK here, and find sample notebooks for Scikit-learn, Pytorch, Tensorflow and MXnet deployments here

Related content: