Scikit-learn Model Serving with Online Prediction Using AI Platform

search share Join Sign in

Scikit-learn Model Serving with Online Prediction Using AI Platform

1 hour 20 minutes 5 Credits


Google Cloud Self-Paced Labs


If you've built machine learning models with scikit-learn, and you want to serve your models in real time for an application, managing the resulting infrastructure may sound like a nightmare. Fortunately, there's an alternative - serving your trained scikit-learn models on AI Platform.

You can now upload a model you've already trained onto Cloud Storage and use AI Platform Prediction to support scalable prediction requests against your trained model.

In this lab you learn how to train a simple scikit-learn model, deploy the model to AI Platform Prediction, and make online predictions against that model.

How to bring a scikit-learn model to AI Platform

Getting your model ready for prediction can be done in 5 steps:

  1. Create and save a model to a file
  2. Upload the saved model to Cloud Storage
  3. Create a model resource in AI Platform
  4. Create a model version (linking your scikit-learn model)
  5. Make an online prediction

This lab walks you through the five steps listed above.

What you will build


What you'll learn

  • How to create a model on AI Platform
  • How to make online predictions against your model on AI Platform

Before you jump in to the lab, learn about the different tools you'll be using to get online prediction up and running on AI Platform:

Google Cloud lets you build and host applications and websites, store data, and analyze data on Google's scalable infrastructure.

AI Platform Prediction is a managed service that enables you to easily build machine learning models that work on any type of data, of any size.

Cloud Storage is a unified object storage for developers and enterprises, from live data serving to data analytics/ML to data archiving.

Cloud SDK is a command line tool which allows you to interact with Google Cloud products.

Join Qwiklabs to read the rest of this lab...and more!

  • Get temporary access to the Google Cloud Console.
  • Over 200 labs from beginner to advanced levels.
  • Bite-sized so you can learn at your own pace.
Join to Start This Lab