Create a storage bucket
Create Virtual Machine
Create directory and download data files
Upload the saved model
Create a model resource
Create a model version
Scikit-learn Model Serving with Online Prediction Using AI Platform
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:
- Create and save a model to a file
- Upload the saved model to Cloud Storage
- Create a model resource in AI Platform
- Create a model version (linking your scikit-learn model)
- 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.