I want to share and enable Vertex AI from Google Cloud with you. The goal here is to share a comprehensive set of end-to-end workflows for machine learning that each cover the range of data to model to serving and managing - even automating the flow. Regardless of your data type, skill level or framework preferences you will find something helpful here.
Click to watch on YouTube
Click here to see current playlist for this repository
To better understand which content is most helpful to users, this repository uses tracking pixels in each markdown (.md
) and notebook (.ipynb
) file. No user or location information gets captured as this is set to use a dummy client and session to protect privacy. The only information captured is that the content was rendered/viewed which gives us a daily count of usage. Please share any concerns you have with this in repositories discussion board and I am happy to also provide a branch without the tracking.
A script is provided to remove this tracking from your local copy of this repository in the file ga4_remove.py
in the folder ga4.
- Tables: Tabular, structured data in rows and columns
- Language: Text for translation and/or understanding
- Vision: Images
- Video
- Use Pre-Trained APIs
- Automate building Custom Models
- End-to-end Custom ML with core tools in the framework of your choice
This is a series of workflow demonstrations that use the same data source to build and deploy the same machine learning model with different frameworks and automation. These are meant to help get started in understanding and learning Vertex AI and provide starting points for new projects.
The demonstrations focus on workflows and don't delve into the specifics of ML frameworks other than how to integrate and automate with Vertex AI. Let me know if you have ideas for more workflows or details to include!
To understand the contents of this repository, the following charts uncover the groupings of the content.
Direction |
---|
Pre-Trained Models | AutoML | |||||
---|---|---|---|---|---|---|
Data Type | Pre-Trained Model | Prediction Types | Related Solutions | |||
Text |
Cloud Translation API |
Detect, Translate |
Cloud Text-to-Speech |
AutoML Translation |
||
Cloud Natural Language API |
Entities (Identify and label), Sentiment, Entity Sentiment, Syntax, Content Classification |
Healthceare Natural Language API |
AutoML Text | |||
Image |
Cloud Vision API |
Crop Hint, OCR, Face Detect, Image Properties, Label Detect, Landmark Detect, Logo Detect, Object Localization, Safe Search, Web Detect |
|
AutoML Image |
||
Audio |
Cloud Media Translation API |
Real-time speech translation |
Cloud Speech-to-Text |
|||
Video |
Cloud Video Intelligence API |
Label Detect*, Shot Detect*, Explicit Content Detect*, Speech Transcription, Object Tracking*, Text Detect, Logo Detect, Face Detect, Person Detect, Celebrity Recognition |
Vertex AI Vision |
AutoML Video |
AutoML | ||
---|---|---|
Data Type |
AutoML |
Prediction Types |
Table |
AutoML Tables |
|
Image |
AutoML Image |
|
Video |
AutoML Video |
|
Text |
AutoML Text |
|
Text |
AutoML Translation |
Translation |
This work focuses on cases where you have training data:
Overview |
---|
AutoML | BigQuery ML | Vertex AI | Forecasting with AutoML, BigQuery ML, OSS Prophet |
---|---|---|---|
Vetex AI is a platform for end-to-end model development. It consist of core components that make the processes of MLOps possible for design patterns of all types.
Many Vertex AI resources can be viewed and monitored directly in the GCP Console. Vertex AI resources are primarily created, and modified with the Vertex AI API.
The API is accessible from:
- the command line with
gcloud ai
, - REST,
- gRPC,
- or the client libraries (built on top of gRPC) for
The notebooks in this repository primarily use the Python client aiplatform
. There is occasional use of aiplatform.gapic
, aiplatform_v1
and aiplatform_v1beta1
.
For the full details on the APIs versions and layers and how/when to use each, see this helpful note.
Install the Vertex AI Python Client
pip install google-cloud-aiplatform
Example Usage: Listing all Model in Vertex AI Model Registry
PROJECT = 'statmike-mlops-349915'
REGION = 'us-central1'
# List all models for project in region with: aiplatform
from google.cloud import aiplatform
aiplatform.init(project = PROJECT, location = REGION)
model_list = aiplatform.Model.list()
The demonstrations are presented in a series of JupyterLab notebooks. These can be reviewed directly in this repository on GitHub or cloned to your Jupyter instance on Vertex AI Workbench.
Select the files and review them directly in the browser or IDE of your choice. This can be helpful for general understanding and selecting sections to copy/paste to your project.
TL;DR
In Google Cloud Console, Select/Create a Project then go to Vertex AI > Workbench > User-Managed Notebooks
- Create a new notebook and Open JupyterLab
- Clone this repository using Git Menu, Open and run
00 - Environment Setup.ipynb
- Create a Project
- Link, Alternatively, go to: Console > IAM & Admin > Manage Resources
- Click "+ Create Project"
- Provide: name, billing account, organization, location
- Click "Create"
- Enable the APIs: Vertex AI API and Notebooks API
- Link
- Alternatively, go to:
- Console > Vertex AI, then enable API
- Then Console > Vertex AI > Workbench, then enable API
- Alternatively, go to:
- Link
- Create A Notebook
- Link, Alternatively, go to: Console > Vertex AI > Workbench
- Click User-Managed Notebooks
- Click "+ Create Notebook" or "+ New Notebook"
- Selections:
- Tensorflow Enterprise > Tensorflow Enterprise 2.3 > Without GPUs
- Provide: name, region = us-central1, machine type = n1-standard-4
- some options may be under "Advanced Options"
- Click "Create"
- Open JupyterLab Notebook Instance
- Once the Notebook Instance is started click the "Open JupyterLab" link
- Clone This Repository to the Notebook Instance
- Use the Git Menu at the top or on the left navigation bar to select "Clone a Repository"
- Provide the Clone URI of this repository: https://github.com/statmike/vertex-ai-mlops.git
- In the File Browser you will now have the folder "vertex-ai-mlops" that contains the files from this repository
- Setup the Notebook Environment for these workflows
- Open the notebook vertex-ai-mlops/00 - Environment Setup
- Follow the instructions and run the cells
Resources on these items:
- Google Cloud Projects
- Vertex AI environment
- Introduction to Notebooks
- Create a Notebooks Instance
- Open Notebooks
- Learning Machine Learning
- I often get asked "How do I learn about ML?". There are lots of good answers. ....
- Explorations
- This is a series of projects for exploring new, new-to-me, and emerging tools in the ML world!
- Tips
- Tips for using the repository and notebooks with examples of core skills like building containers, parameterizing jobs and interacting with other GCP services. These tips help with scaling jobs and developing them with a focus on CI/CD.
This is my personal repository of demonstrations I use for learning and sharing Vertex AI. There are many more resources available. Within each notebook I have included a resources section and a related training section.
- GitHub GoogleCloudPlatform/vertex-ai-samples
- GitHub GoogleCloudPlatform/mlops-with-vertex-ai
- Overview of Data Science on Google Cloud
See individual todo list in the readme within each folder of the repository
- for each notebook add a list of api's, roles, perimission used
- use virtualenv throughout
- move all setup of apis into the 00 folder and reference them as prerequisites
- add colab link in all notebooks (if possible)
- remove numbering from frameworks
- New folder MLOps that pull all dev tools and workflows together