• Home
  • BentoML to Kubernetes

Building, serving and eventing an Iris model using BentoML on Kubernetes

BentoML to Kubernetes

Building, serving and eventing an Iris model using BentoML on Kubernetes
BentoML to Kubernetes

There are many frameworks, libraries, and tools in the machine learning and Python spaces. One that stands out for machine learning is BentoML. BentoML takes a step outward and looks at all the frameworks for modeling, sees the need for presenting a public API for these models, and sees a need for a way to package the models for production. BentoML will take your model, expose a public API, package it in a container suitable for delivery to a variety of targets, and is ideal for Kubernetes.

BentoML supports many of the commonly found ML frameworks: Scikit-learn, PyTorch, Tensorflow, TF Keras, XGBoost, LightGBM, FastText, FastAI, H2O, ONNX, Spacy, Statsmodels, CoreML, Transformers, and Gluon, and is always looking for more.

This lab will introduce BentoML using Scikit-learn. We’ll use the ubiquitous Iris model. BentoML will generate an API endpoint, package the Scikit-learn model in a container, and add a predict REST call.

In this lab, you will learn how to:

    ☐ Install BentoML
    ☐ Code a model like Scikit-learn
    ☐ Use BentoML to generate an API for the model
    ☐ Use BentoML to package the model and API in a container
    ☐ Run and access the model on Kubernetes

These instructions have been adapted from the BentoML documentation on Deploying to Kubernetes Cluster .

Because BentoML handles the container build and containers can run anywhere, there is a wide choice of deployment targets for the model in a container.

  • LEVEL

    Beginner

  • DURATION

    25 minutes

  • UPDATED

    31 Dec, 2021