0% found this document useful (0 votes)
30 views

M6 - Custom Model Building With Cloud AutoML Slides

Cloud AutoML can be used to build custom machine learning models. It provides tools for image classification with AutoML Vision, text analysis with AutoML NLP, and structured data with AutoML Tables. The process involves preparing a dataset and training a model, which can then be deployed and used to classify new data.

Uploaded by

Deepak Kapoor
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

M6 - Custom Model Building With Cloud AutoML Slides

Cloud AutoML can be used to build custom machine learning models. It provides tools for image classification with AutoML Vision, text analysis with AutoML NLP, and structured data with AutoML Tables. The process involves preparing a dataset and training a model, which can then be deployed and used to classify new data.

Uploaded by

Deepak Kapoor
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Custom Model

building with
Cloud AutoML
Agenda
Why Auto ML?

Auto ML Vision

Auto ML NLP

Auto ML Tables
Create and deploy custom models with AutoML
Build a Custom Build Custom Call a Pretrained Model
Model Model (codeless)

AutoML Cloud Cloud Cloud Cloud Video


Cloud TPUs Compute Engine Translation API Vision API Speech API Intelligence API

Data Loss Cloud Speech Cloud Natural


Prevention API Synthesis API Language API
Cloud Dataproc Kubernetes Engine

Cloud AI Platform BigQuery ML


Dialogflow
Training high-quality, custom ML models requires a
lot of effort and expertise
Expertise

Time

Math
Cloud AutoML follows a standard procedure that is divided
into train, deploy, and serve phases

Train Deploy Serve

Dataset preparation Predict


Readiness analysis Classify
Train
Test and evaluate Manage
Cloud AutoML uses a Prepared Dataset to train a Custom
Model
Train Deploy Serve

TRAIN
VALIDATION
optional
column
TEST

CSV
file

Labels Source Files


Cloud AutoML performs basic checks and a preliminary
analysis of the Prepared Dataset to determine if there is
enough information and if it is properly organized

Train Deploy Serve

Trained
Prepared
Analysis Training Custom
Dataset
Model

Start
Training
Data from the TEST group is used to evaluate the Custom
Model and to remove bias from the evaluation

Trained
Custom
Model Predictions and
classifications

Prepared
Dataset
Evaluation
Accuracy ?
TEST group
There is nothing you need to do to deploy a trained model

Train Deploy Serve

https://automl.googleapis.com/
Serve models using the Web UI, or from the command line
using CURL to send a JSON-structured request
Train Deploy Serve

model-name
payload https://automl.googleapis.com/

displayName
classification
score
Break up complicated problem into multiple models
Model 2
Model 3
Model 1
Model 1

Model 2

Model 3 Model 4
#1
As a data engineer should

#1
you build or buy a NO Trained on same input and
label?

solution? YES

YES NO
Custom and automated
Got more data than the
off-the-shelf solution?
BUILD
AutoML
Vision AutoML Natural Language AutoML Translation AutoML
Speech-to-Text

Platform Services Marketplace Sight

BUY
Cloud Data Fusion AI Hub Cloud
Cloud Dataflow Cloud Dataproc Google BigQuery BigQuery ML
Cloud AI Platform Vision API Cloud Video Intelligence API

Conversation
Infrastructure ML Libraries Language

Cloud GPU Tensorflow


Cloud Natural Language Dialogflow
Cloud Translation API Cloud Speech-to-Text API Cloud Text-to-Speech API
API Enterprise
Cloud TPU Kubeflow Pipelines
Agenda
Why Auto ML?

Auto ML Vision

Auto ML NLP

Auto ML Tables
Cloud AutoML Vision specializes in training models for
image classification
Prepared Dataset

CSV
TRAIN gs://… label1, label2, label3 ...
file

Data group base64 encoded 2 to 20 labels


max 30MB image file or blank for manual labeling
Import from computer

Custom Model

Evaluation Deletion
Average precision ?? days unused
Confidence threshold curves 24 months max
Confusion matrix
Improving Vision Custom Models

+1

Train on examples similar Low scores: Perfect scores:


to those you will classify Increase data Increase variety

Verify labels are used consistently


100x images for most common labels
than the least common labels
Remove infrequently used labels
Agenda
Why Auto ML?

Auto ML Vision

Auto ML NLP

Auto ML Tables
Cloud AutoML Natural Language specializes in training
models for text
Prepared Dataset

CSV
TRAIN gs://… label1, label2, label3 ...
file

Data group Text .txt file 2 to 100 labels


or
Inline text

Custom Model

Evaluation Deletion
Average precision 60 days unused
Confidence threshold curves 6 months max
Confusion matrix
Improving Natural Language Custom Models

-1

Add more Increase Reduce the


documents document number of
variety labels
Agenda
Why Auto ML?

Auto ML Vision

Auto ML NLP

Auto ML Tables
Cloud AutoML Table is for structured data
Phase 2: Architecture Search & Tuning Phase 3 CV,
Bagging
Classification Regression
Ensemble
Phase 4
Loss Function Selector Deploy

Auto Model Type Selection


NN Auto Layer
Tree Auto Constructor
Constructor


Auto Feature: Selection & Embedding

Phase 1: Auto Data Preprocessing (TF Transform)

123
...
Categorical Numerical Text DateTime
Features Features Features Features
Example: Mercari Price Suggestion Challenge
Goal: Automatically suggest product prices to online sellers

Training data

ID Name Item Categories Brand Shipping Item Price


Condition name description
0 MLB Cincinnati 3 Men, Tops, 1 No description yet $10
Reds T Shirt T-shirts
Size XL
1 Razer 3 Electronics, Razer 0 This keyboard is in great condition and works $52
BlackWidow Computers & like it came out of the box. All of the ports are
Chroma Tablets, tested and work perfectly. The lights are
Keyboard Components & customizable via the Razer Synapse app on
Parts your PC.
2 AVA-VIV Blouse 1 Women, Tops & Target 1 Adorable top with a hint of lace and a key hole $10
Blouses, Blouse in the back! The pale pink is a 1X, and I also
have a 3X available in white!
3 Leather Horse 1 Home, Home 1 New with tags. Leather horses. Retail for [rm] $35
Statues Décor, Home each. Stand about a foot high. They are being
Décor Accents sold as a pair. Any questions please ask. Free
shipping. Just got out of storage
AutoML Tables produced some of the best results on
the challenge
The easiest way to import data into AutoML Tables is
through BigQuery
Start by setting the features/label that will be used
for training
Next, do some data validation to ensure you’re not
passing junk into your model
Carry out some
experiments in
BigQuery ML to set
some base metrics
for model
performance
You can allocate a budget when training the model
Inspect the training metrics across multiple models
Check how model performs against test data to
gauge how well it will generalize in the wild
Integrate your trained model into your applications
How to choose between BQML, AutoML and a
custom model
Model type BigQuery ML AutoML Custom deep learning model

How SQL in BigQuery AutoML uses neural architecture Keras with a TensorFlow backend,
for ML on search and best-of-class model trained on Cloud ML Engine
structured data architectures for the specific
problem

Best if you are a Data analyst who Developer who can create the ML Engineer who knows Python
can wrangle data dataset in the required format and knows deep learning, NLP
with SQL techniques

How long it takes About an hour About a day A week to a month


an experienced
practitioner

Most of this time Writing SQL Waiting for job to finish Coding Python and
is spent in experimentation with ML

Cloud computing Low Medium Medium to high depending on size


costs of data, number of experiments,
etc.

Accuracy Moderate to high, High Low if you don't know what you are
mostly depending doing; extremely high if you
on the size of your employ appropriate architectures
dataset and have a large-enough dataset
Module Summary
● Cloud AutoML can be used to create powerful ML
models without any coding
● Use AutoML Vision when you have image data
● Use AutoML NLP when you have text data
● Use AutoML Tables when you have structured data

You might also like