Professional Documents
Culture Documents
Module 5 Python Notebooks in The Cloud
Module 5 Python Notebooks in The Cloud
Python
Intro to What it means to Human-centered
How Google does ML notebooks in
Specialization be AI-first ML
the Cloud
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Agenda
Cloud Datalab
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Cut Video
Share
Code
A typical
notebook
Output contains code,
charts, and
explanations
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Demo of Cloud Datalab
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Cut Video
PHASE 5 PHASE 1
5 2 5
Share and Write code in
collaborate Python
1
Development
PHASE 4
Process in
Cloud Datalab PHASE 2
3
Write Run cell
commentary (Shift+Enter)
in markdown
4
PHASE 3
Examine Output
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Datalab notebooks let you change the underlying hardware
Save/read 10 GB PD
CUS
VM
4 2 1
Notebook files
Cloud repository
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Demo of rehosting Cloud Datalab
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Cut Video
Cloud Pandas
CSV Files improve
Datalab Dataframes
Apache Tensor
Beam Flow
improve /
serverless /
hypertune
Cloud Cloud Cloud
Storage Dataflow Machine
Learning
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Datalab integrates well with Google Cloud Platform products
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Starting Cloud Datalab in Cloud Shell is quite simple ...
1
datalab create my-datalab-vm \
--machine-type n1-highmem-8 \
--zone us-central1-a
2
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
21
Networking
Data storage
Compute power
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
22
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
23
Bucket Bucket
Copy
Objects Objects
Data and Data and
metadata metadata
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
24
Set up Qwiklabs
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Lab environment
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Use Qwiklabs to get a temporary GCP account
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Come back to Qwiklabs to practice; do our Quests
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Source code for labs is on GitHub
https://github.com/GoogleCloudPlatform/training-dat
a-analyst/tree/master/courses/machine_learning/dee
pdive
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Cut Video
Lab: Rent-a-VM
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Lab: Rent-a-VM to process
earthquakes data
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Lab: Rent-a-VM to process earthquakes data
In this lab you spin up a virtual 1. Create a Compute 2. SSH into the instance
machine, configure its security, Engine instance with the Install the software
access it remotely, and then necessary Access and package Git (for source
carry out the steps of an Security code version control)
ingest-transform-and-publish
data pipeline manually.
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Cut Video
Lab debrief
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Cut Video
CloudShell
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Follow-along: Cloud Shell gives you an easy command-line
Cli
ck
Do
Now
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Cut Video
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Agenda
Cloud Datalab
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Spinning up VMs yourself doesn’t scale … what you want are
managed services that autoscale for you
2002 2004 2005 2006 2008 2010 2012 2014 2015 2017
Google Papers
GFS MapReduce BigTable Dremel PubSub Flume Java Millwheel Dataflow TensorFlow Spanner
Megastore
Cloud Dataproc
BigQuery Pub/Sub Cloud Spanner
Cloud Dataflow
Google Big Data Stack 1.0 Google Big Data Stack 2.0
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Demo: Query large datasets within
BigQuery
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Demo: Query large datasets in seconds
#standardsql
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
BigQuery offers...
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Cut Video
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Lab: Analyzing data using
BigQuery and Datalab
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Lab: Analyzing data Using Datalab and BigQuery
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Notes to Video Editor:
Cut Video: ML, not rules
Insert: Lak talking head intro Sara
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Agenda
Cloud Datalab
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
How would we do this without ML?
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
How would we do this without ML?
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
How would we do this without ML?
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Not so fast...
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Two ways to add ML to your apps rning
Friendly machine lea
Custom ML models
Natural Video
Language API Intelligence API
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Cut Video
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Cloud Vision
Complex image detection with a
simple REST request
GIPHY: Cloud Vision in production
http://engineering.giphy.com
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Label & web Logo
OCR
detection detection
cloud.google.com/vision
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Vision API demo
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Cut Video
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Cloud Video
Intelligence
Understand your video’s entities
at shot, frame, or video level
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Video &
Label Shot change
scene-level
detection detection
annotations
Explicit content
Regionalization
detection
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Video API demo
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Cut Video
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Cloud Speech
Speech to text transcription in
100+ languages
Batch &
Speech to text Speech Profanity
streaming
transcription timestamps filtering
transcription
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Demo: speech timestamps
1 2 3
Extract audio from Send audio to Cloud Visualize & search
a video Speech for transcription videos in a UI
& timestamps
Cut Video
Translation + NL
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Cloud Translation
Translate text into 100+ languages
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Translate Detect
text language
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Cloud Natural
Language
Understand text with a simple
REST API request
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Extract Detect Analyze Classify
entities sentiment syntax content
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Analyze syntax
help
Number = SINGULAR Number = SINGULAR Number = SINGULAR Mood = INDICATIVE Case = ACCUSATIVE Number = SINGULAR
Proper = PROPER Proper = PROPER Proper = PROPER Number = SINGULAR Number = PLURAL
Person = THIRD Person = FIRST
Tense = Present
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Classify content using Cloud Natural Language
{ categories:
[
{
name: '/Sports/Team
Sports/Baseball',
confidence: 0.99
Rafael Montero Shines in Mets’ Victory Over the Reds. Montero, who }
was demoted at midseason, took a one-hitter into the ninth inning as ]
the Mets continued to dominate Cincinnati with a win at Great }
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Wootric: Cloud Natural Language in production
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Wootric: analyzing and routing feedback
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Try Cloud NL in the browser
cloud.google.com/natural-language
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Cut Video
Lab on ML APIs
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
88
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
Lab: Invoke Machine Learning APIs
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
The ML APIs are microservices that provide a high level of
abstraction
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.
cloud.google.com
Images by Connie Zhou
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other
company and product names may be trademarks of the respective companies with which they are associated.