0Pricing
MLOps Academy · Lesson

Save a Model to the Bento Store

Register a model artifact with BentoML.

Save a Model to the Bento Store is a free MLOps Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the MLOps Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Meet BentoML

BentoML is a Python framework that packages and serves models with batching and scaling built in, so you skip a lot of boilerplate. 🚀

Install It

Getting started takes one command. You install bentoml from pip just like any other Python package.

pip install bentoml

The Bento Store

The Bento Store is a local registry on your machine. Every model you save lands there with a name and an automatic version tag.

Train Something First

You need a model before you can save one. Here you fit a simple scikit-learn classifier on some data.

from sklearn.svm import SVC
clf = SVC()
clf.fit(X, y)

Save with the Framework API

BentoML ships a helper per framework. For scikit-learn you call bentoml.sklearn.save_model with a name and the fitted model.

import bentoml
bentoml.sklearn.save_model("iris_clf", clf)

Names and Tags

Each save creates a tag like iris_clf:abc123. The name stays the same while the version after the colon changes every save.

Other Frameworks Too

The same pattern works everywhere. Swap the module to match your framework, like bentoml.pytorch or bentoml.xgboost.

bentoml.pytorch.save_model("net", model)

List Your Models

You can see everything in the store from your terminal. The bentoml models list command shows names, tags, and sizes.

bentoml models list

Load It Back

To use a saved model you load it by tag. Passing latest grabs the newest version without hardcoding a hash.

model = bentoml.sklearn.load_model("iris_clf:latest")

Attach Custom Metadata

You can stash extra info at save time. Adding metadata like accuracy travels with the model so teammates know what it is.

bentoml.sklearn.save_model("iris_clf", clf, metadata={"acc": 0.96})

Clean Up Old Versions

The store can fill up over time. You prune anything you no longer need with the bentoml models delete command and a tag.

bentoml models delete iris_clf:abc123

Quick Check

You just ran save_model twice for the same name. What identifies the two saves apart?

Recap

You installed BentoML, saved a model to the Bento Store with a framework helper, listed it, and loaded it back by tag. The model is now managed! 🙌

Frequently asked questions

Is the “Save a Model to the Bento Store” lesson free?

Yes — the full text of “Save a Model to the Bento Store” is free to read here on the web, and the MLOps Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the MLOps Academy course, upgrade to CoddyKit PRO.

What will I learn in “Save a Model to the Bento Store”?

Register a model artifact with BentoML. You practise MLOps Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start MLOps Academy?

No prior experience is required. MLOps Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Save a Model to the Bento Store” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this MLOps Academy lesson?

Yes. Every MLOps Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Save a Model to the Bento Store
  2. Define a Service and Its API
  3. Enable Adaptive Micro-Batching
  4. Build a Bento and Containerize It
← Back to MLOps Academy