Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.72 KB

pipeline.md

File metadata and controls

53 lines (37 loc) · 1.72 KB

Walkthrough for creating a classification pipeline

Introduction

The aim of this walkthrough is to create a classification pipeline in Cloud Run. The end goal is to have a service which could accept input from a web form and output a classification, together with auxiliary features such as metrics and logging. The idea is to simulate what we might go through to create a risk estimation service for Trevor which could be plugged into web applications.

Throughout this walkthrough, I am using GCP while signed in from my google.com account. This has some implications for things like the folder hierarchy, and I expect some changes might need to be made for accounts at Trevor. We should copy and modify this walkthrough appropriately.

We'll do most of the work in Cloud Shell. It's a shell which runs in the browser, onto a VM with 5GB of storage. To activate Cloud Shell, click this button

You can also activate the shell from the icon.

Steps of the walkthrough

  1. Setting up the project.
  2. Creating and deploying a service.
  3. Accepting input.
  4. Calling out to a classifier.
  5. Calling the service from other code.

Setting up the project

  1. Authorize the Cloud Shell to access your project.

    gcloud auth logging

    If you are already authorized, you don't need to do this again.

  2. Set an environment variable to the ID of the project you created or selected in step 1, for the convenience of later commands.

    PROJECT_ID=   # Fill in your project ID here.
  3. Set this as the current project.

    gcloud config set project $PROJECT_ID

... API set up ...