mirror of
https://github.com/GoogleCloudPlatform/vertex-ai-samples.git
synced 2026-09-26 14:42:04 +00:00
Compare commits
21
Commits
main
...
autoindex_1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
541203eedc | ||
|
|
e1f2475ba4 | ||
|
|
10e54f5c5b | ||
|
|
36f56177a1 | ||
|
|
9e374ad59e | ||
|
|
0f78431f29 | ||
|
|
a823ae30b2 | ||
|
|
deee6a92ee | ||
|
|
f9e32c79cc | ||
|
|
604cdc4591 | ||
|
|
073a64d144 | ||
|
|
e176670357 | ||
|
|
362d4a3566 | ||
|
|
efdf87b356 | ||
|
|
f28ac436d0 | ||
|
|
d1fe0179d7 | ||
|
|
0a56fdff05 | ||
|
|
02483bdf77 | ||
|
|
913eb6b8a4 | ||
|
|
8632c5732c | ||
|
|
292d427547 |
@@ -380,7 +380,6 @@ class NotebookRule(ABC):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
class CopyrightRule(NotebookRule):
|
||||
def validate(self, notebook: Notebook) -> bool:
|
||||
"""
|
||||
@@ -401,16 +400,6 @@ class NoticesRule(NotebookRule):
|
||||
if cell['source'][0].startswith('This notebook'):
|
||||
notebook.pop()
|
||||
return True
|
||||
|
||||
class TestEnvRule(NotebookRule):
|
||||
def validate(self, notebook: Notebook) -> bool:
|
||||
"""
|
||||
Parse the (optional) test in which environment cell
|
||||
"""
|
||||
cell = notebook.peek()
|
||||
if cell['source'][0].startswith('**_NOTE_**: This notebook has been tested'):
|
||||
notebook.pop()
|
||||
return True
|
||||
|
||||
|
||||
class TitleRule(NotebookRule):
|
||||
@@ -496,6 +485,28 @@ class LinksRule(NotebookRule):
|
||||
return ret
|
||||
|
||||
|
||||
class TableRule(NotebookRule):
|
||||
def validate(self, notebook: Notebook) -> bool:
|
||||
"""
|
||||
Parse the (optional) table of contents cell
|
||||
"""
|
||||
cell = notebook.peek()
|
||||
if cell['source'][0].startswith('## Table of contents'):
|
||||
notebook.pop()
|
||||
return True
|
||||
|
||||
|
||||
class TestEnvRule(NotebookRule):
|
||||
def validate(self, notebook: Notebook) -> bool:
|
||||
"""
|
||||
Parse the (optional) test in which environment cell
|
||||
"""
|
||||
cell = notebook.peek()
|
||||
if cell['source'][0].startswith('**_NOTE_**: This notebook has been tested'):
|
||||
notebook.pop()
|
||||
return True
|
||||
|
||||
|
||||
class OverviewRule(NotebookRule):
|
||||
def validate(self, notebook: Notebook) -> bool:
|
||||
"""
|
||||
@@ -1050,6 +1061,7 @@ notices = NoticesRule()
|
||||
title = TitleRule()
|
||||
links = LinksRule()
|
||||
testenv = TestEnvRule()
|
||||
table = TableRule()
|
||||
overview = OverviewRule()
|
||||
objective = ObjectiveRule()
|
||||
recommendations = RecommendationsRule()
|
||||
@@ -1065,7 +1077,7 @@ enableapis = EnableAPIsRule()
|
||||
setupproject = SetupProjectRule()
|
||||
|
||||
# Cell Validation
|
||||
rules = [ copyright, notices, title, links, testenv, overview, objective,
|
||||
rules = [ copyright, notices, title, links, testenv, table, overview, objective,
|
||||
recommendations, dataset, costs, setuplocal, helpers,
|
||||
installation, restart, versions, beforebegin, enableapis,
|
||||
setupproject
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
"id": "JAPoU8Sm5E6e"
|
||||
},
|
||||
"source": [
|
||||
"# Vertex AI SDK for Python: AutoML Tabular Training and Prediction\n",
|
||||
"# Vertex AI SDK for Python: AutoML Tabular training and prediction\n",
|
||||
"\n",
|
||||
"<table align=\"left\">\n",
|
||||
" <td>\n",
|
||||
@@ -63,7 +63,7 @@
|
||||
"\n",
|
||||
"This tutorial demonstrates how to use the Vertex AI Python client library to train and deploy a tabular classification model for online prediction.\n",
|
||||
"\n",
|
||||
"**Note**: you may incur charges for training, prediction, storage, or usage of other GCP products in connection with testing this SDK."
|
||||
"**Note**: you may incur charges for training, prediction, storage, or usage of other Google Cloud products in connection with testing this SDK."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -76,6 +76,11 @@
|
||||
"\n",
|
||||
"In this tutorial, you learn how to train and make predictions on an AutoML model based on a tabular dataset. Alternatively, you can train and make predictions on models by using the `gcloud` command-line tool or by using the online Cloud Console.\n",
|
||||
"\n",
|
||||
"This tutorial uses the following Google Cloud ML services and resources:\n",
|
||||
"\n",
|
||||
"- Vertex AI\n",
|
||||
"- AutoML Tabular\n",
|
||||
"\n",
|
||||
"The steps performed include the following:\n",
|
||||
"\n",
|
||||
"- Create a Vertex AI model training job.\n",
|
||||
@@ -122,7 +127,9 @@
|
||||
"id": "install_aip"
|
||||
},
|
||||
"source": [
|
||||
"## Installation"
|
||||
"## Installation\n",
|
||||
"\n",
|
||||
"Install the packages required for executing this notebook."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -135,55 +142,20 @@
|
||||
"source": [
|
||||
"import os\n",
|
||||
"\n",
|
||||
"# The Google Cloud Notebook product has specific requirements\n",
|
||||
"IS_GOOGLE_CLOUD_NOTEBOOK = os.path.exists(\"/opt/deeplearning/metadata/env_version\")\n",
|
||||
"# The Vertex AI Workbench Notebook product has specific requirements\n",
|
||||
"IS_WORKBENCH_NOTEBOOK = os.getenv(\"DL_ANACONDA_HOME\") and not os.getenv(\"VIRTUAL_ENV\")\n",
|
||||
"IS_USER_MANAGED_WORKBENCH_NOTEBOOK = os.path.exists(\n",
|
||||
" \"/opt/deeplearning/metadata/env_version\"\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"# Google Cloud Notebook requires dependencies to be installed with '--user'\n",
|
||||
"# Vertex AI Notebook requires dependencies to be installed with '--user'\n",
|
||||
"USER_FLAG = \"\"\n",
|
||||
"if IS_GOOGLE_CLOUD_NOTEBOOK:\n",
|
||||
" USER_FLAG = \"--user\""
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "b03b7f4487ff"
|
||||
},
|
||||
"source": [
|
||||
"Install the latest version of the Vertex AI client library.\n",
|
||||
"if IS_WORKBENCH_NOTEBOOK:\n",
|
||||
" USER_FLAG = \"--user\"\n",
|
||||
"\n",
|
||||
"Run the following command in your virtual environment to install the Vertex SDK for Python:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"id": "d489d38261dd"
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"! pip install {USER_FLAG} --upgrade google-cloud-aiplatform"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "install_storage"
|
||||
},
|
||||
"source": [
|
||||
"Install the Cloud Storage library:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"id": "qssss-KSlugo"
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"! pip install {USER_FLAG} --upgrade google-cloud-storage"
|
||||
"# Install the packagesimport os\n",
|
||||
"! pip3 install {USER_FLAG} -q --upgrade google-cloud-aiplatform \\\n",
|
||||
" google-cloud-storage"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
"id": "mThXALJl9Yue"
|
||||
},
|
||||
"source": [
|
||||
"# Tabular Workflow: AutoML Tabular Pipeline\n",
|
||||
"# AutoML Tabular Workflow pipelines\n",
|
||||
"\n",
|
||||
"<table align=\"left\">\n",
|
||||
" <td>\n",
|
||||
@@ -72,7 +72,12 @@
|
||||
"source": [
|
||||
"### Objective\n",
|
||||
"\n",
|
||||
"In this tutorial, you learn how to create two regression models using [Vertex Pipelines](https://cloud.google.com/vertex-ai/docs/pipelines/introduction) downloaded from [Google Cloud Pipeline Components](https://cloud.google.com/vertex-ai/docs/pipelines/components-introduction) (GCPC). These pipelines will be Vertex AI Tabular Workflow pipelines which are maintained by Google. These pipelines will showcase different ways to customize the Vertex Tabular training process.\n",
|
||||
"In this tutorial, you learn how to create two regression models using [Vertex AI Pipelines](https://cloud.google.com/vertex-ai/docs/pipelines/introduction) downloaded from [Google Cloud Pipeline Components](https://cloud.google.com/vertex-ai/docs/pipelines/components-introduction) (GCPC). These pipelines will be Vertex AI Tabular Workflow pipelines which are maintained by Google. These pipelines will showcase different ways to customize the Vertex Tabular training process.\n",
|
||||
"\n",
|
||||
"This tutorial uses the following Google Cloud ML services:\n",
|
||||
"\n",
|
||||
"- `AutoML Training`\n",
|
||||
"- `Vertex AI Datasets`\n",
|
||||
"\n",
|
||||
"The steps performed are:\n",
|
||||
"\n",
|
||||
|
||||
@@ -64,6 +64,32 @@
|
||||
"This tutorial demonstrates how to use the Vertex AI SDK for Python to create hierarchical forecasting models using a Google Cloud [AutoML](https://cloud.google.com/vertex-ai/docs/start/automl-users)and do batch prediction. Specifically, you predict a fictional store's sales based on historical sales data."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "objective:automl,training,online_prediction"
|
||||
},
|
||||
"source": [
|
||||
"### Objective\n",
|
||||
"\n",
|
||||
"In this tutorial, you create an AutoML hierarchical forecasting model and deploy it for batch prediction using the Vertex AI SDK for Python. You can alternatively create and deploy models using the `gcloud` command-line tool or batch using the Cloud Console.\n",
|
||||
"The rationale for a hierarchical forecasting model is to minimize the error for a given group of sales data. In this tutorial, you will be minimizing the error for sale predictions at the \"product\" level.\n",
|
||||
"\n",
|
||||
"This tutorial uses the following Google Cloud ML services:\n",
|
||||
"\n",
|
||||
"- `AutoML Training`\n",
|
||||
"- `Vertex AI Datasets`\n",
|
||||
"\n",
|
||||
"The steps performed include:\n",
|
||||
"\n",
|
||||
"- Create a Vertex AI `TimeSeriesDataset` resource.\n",
|
||||
"- Train the model.\n",
|
||||
"- View the model evaluation.\n",
|
||||
"- Deploy the `Model` resource to a serving `Endpoint` resource.\n",
|
||||
"- Make a prediction.\n",
|
||||
"- Undeploy the `Model`."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
@@ -90,27 +116,6 @@
|
||||
"Link to data: gs://cloud-samples-data/vertex-ai/structured_data/forecasting/synthetic_sales_data.csv"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "objective:automl,training,online_prediction"
|
||||
},
|
||||
"source": [
|
||||
"### Objective\n",
|
||||
"\n",
|
||||
"In this tutorial, you create an AutoML hierarchical forecasting model and deploy it for batch prediction using the Vertex AI SDK for Python. You can alternatively create and deploy models using the `gcloud` command-line tool or batch using the Cloud Console.\n",
|
||||
"The rationale for a hierarchical forecasting model is to minimize the error for a given group of sales data. In this tutorial, you will be minimizing the error for sale predictions at the \"product\" level.\n",
|
||||
"\n",
|
||||
"The steps performed include:\n",
|
||||
"\n",
|
||||
"- Create a Vertex AI `TimeSeriesDataset` resource.\n",
|
||||
"- Train the model.\n",
|
||||
"- View the model evaluation.\n",
|
||||
"- Deploy the `Model` resource to a serving `Endpoint` resource.\n",
|
||||
"- Make a prediction.\n",
|
||||
"- Undeploy the `Model`."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
|
||||
@@ -66,17 +66,6 @@
|
||||
"This tutorial demonstrates how to use the Vertex AI SDK to create image object detection models and do batch prediction using a Google Cloud [AutoML](https://cloud.google.com/vertex-ai/docs/start/automl-users) model."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "dataset:salads,iod"
|
||||
},
|
||||
"source": [
|
||||
"### Dataset\n",
|
||||
"\n",
|
||||
"The dataset used for this tutorial is the Salads category of the [OpenImages dataset](https://www.tensorflow.org/datasets/catalog/open_images_v4) from [TensorFlow Datasets](https://www.tensorflow.org/datasets/catalog/overview). This dataset does not require any feature engineering. The version of the dataset you will use in this tutorial is stored in a public Cloud Storage bucket. The trained model predicts the bounding box locations and the corresponding type of salad items in an image from a class of five items: salad, seafood, tomato, baked goods, or cheese."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
@@ -87,6 +76,11 @@
|
||||
"\n",
|
||||
"In this tutorial, you create an AutoML image object detection model from a Python script, and then do a batch prediction using the Vertex AI SDK. You can alternatively create and deploy models using the `gcloud` command-line tool or online using the Cloud Console.\n",
|
||||
"\n",
|
||||
"This tutorial uses the following Google Cloud ML services:\n",
|
||||
"\n",
|
||||
"- `AutoML Training`\n",
|
||||
"- `Vertex AI Datasets`\n",
|
||||
"\n",
|
||||
"The steps performed include:\n",
|
||||
"\n",
|
||||
"- Create a Vertex `Dataset` resource.\n",
|
||||
@@ -101,6 +95,17 @@
|
||||
"* Batch Prediction Service: Does a queued (batch) prediction for the entire set of instances in the background and stores the results in a Cloud Storage bucket when ready."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "dataset:salads,iod"
|
||||
},
|
||||
"source": [
|
||||
"### Dataset\n",
|
||||
"\n",
|
||||
"The dataset used for this tutorial is the Salads category of the [OpenImages dataset](https://www.tensorflow.org/datasets/catalog/open_images_v4) from [TensorFlow Datasets](https://www.tensorflow.org/datasets/catalog/overview). This dataset does not require any feature engineering. The version of the dataset you will use in this tutorial is stored in a public Cloud Storage bucket. The trained model predicts the bounding box locations and the corresponding type of salad items in an image from a class of five items: salad, seafood, tomato, baked goods, or cheese."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
"\n",
|
||||
"In this tutorial, you learn how to create an AutoML tabular regression model and deploy it for batch prediction using the Vertex AI SDK for Python. You can alternatively create and deploy models using the `gcloud` command-line tool or batch using the Cloud Console.\n",
|
||||
"\n",
|
||||
"This tutorial uses the following Google Cloud ML services and resources:\n",
|
||||
"This tutorial uses the following Google Cloud ML services:\n",
|
||||
"\n",
|
||||
"- Vertex AI Datasets (Tabular)\n",
|
||||
"- Vertex AI Training (AutoML Tabular Training)\n",
|
||||
|
||||
@@ -73,7 +73,12 @@
|
||||
"source": [
|
||||
"### Objective\n",
|
||||
"\n",
|
||||
"In this tutorial, you learn how to create an AutoML text entity extraction model and deploy for online prediction from a Python script using the Vertex SDK. You can alternatively create and deploy models using the `gcloud` command-line tool or online using the Cloud Console.\n",
|
||||
"In this tutorial, you learn how to create an AutoML text entity extraction model and deploy for online prediction from a Python script using the Vertex AI SDK. You can alternatively create and deploy models using the `gcloud` command-line tool or online using the Cloud Console.\n",
|
||||
"\n",
|
||||
"This tutorial uses the following Google Cloud ML services:\n",
|
||||
"\n",
|
||||
"- `AutoML Training`\n",
|
||||
"- `Vertex AI Datasets`\n",
|
||||
"\n",
|
||||
"The steps performed include:\n",
|
||||
"\n",
|
||||
|
||||
+16
-1
@@ -72,7 +72,22 @@
|
||||
"source": [
|
||||
"### Objective\n",
|
||||
"\n",
|
||||
"In this notebook, you learn how to integrate preprocessing code in a Vertex AI experiments. Also you build the experiment lineage lets you record, analyze, debug, and audit metadata and artifacts produced along your ML journey."
|
||||
"In this notebook, you learn how to integrate preprocessing code in a Vertex AI experiments. Also you build the experiment lineage lets you record, analyze, debug, and audit metadata and artifacts produced along your ML journey.\n",
|
||||
"\n",
|
||||
"This tutorial uses the following Google Cloud ML services and resources:\n",
|
||||
"\n",
|
||||
"- Vertex ML Metadata\n",
|
||||
"- Vertex AI Experiments\n",
|
||||
"\n",
|
||||
"The steps performed include:\n",
|
||||
"\n",
|
||||
"- Execute module for preprocessing data\n",
|
||||
" - Create a dataset artifact\n",
|
||||
" - Log parameters\n",
|
||||
"- Execute module for training the model\n",
|
||||
" - Log parameters\n",
|
||||
" - Create model artifact\n",
|
||||
" - Assign tracking lineage to dataset, model and parameters"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
"source": [
|
||||
"## Overview\n",
|
||||
"\n",
|
||||
"Depending on the model life cycle of your data science team, you would like to experiment and track training Pipeline runs and its associated parameters. Then, you would to compare runs of these Pipelines to each others in order to figure out which is the best configuration generates the model you will register in the Vertex AI Model Registry."
|
||||
"Depending on the model life cycle of your data science team, you would like to experiment and track training pipeline runs and its associated parameters. Then, you would to compare runs of these Pipelines to each others in order to figure out which is the best configuration generates the model you will register in the Vertex AI Model Registry."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -74,6 +74,11 @@
|
||||
"\n",
|
||||
"In this notebook, you learn how to use `Vertex AI Experiments` to log a pipeline job and compare different pipeline jobs.\n",
|
||||
"\n",
|
||||
"This tutorial uses the following Google Cloud ML services and resources:\n",
|
||||
"\n",
|
||||
"- Vertex AI Pipelines\n",
|
||||
"- Vertex AI Experiments\n",
|
||||
"\n",
|
||||
"The steps performed include:\n",
|
||||
"\n",
|
||||
"* Formalize a training component\n",
|
||||
|
||||
+11
-2
@@ -62,7 +62,7 @@
|
||||
"## Overview\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"This tutorial demonstrates how to use the Vertex SDK to train and deploy a custom tabular regression model for online prediction with explanation."
|
||||
"This tutorial demonstrates how to use the Vertex AI SDK to train and deploy a custom tabular regression model for online prediction with explanation."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -73,7 +73,16 @@
|
||||
"source": [
|
||||
"### Objective\n",
|
||||
"\n",
|
||||
"In this tutorial, you learn how to create a custom model from a Python script in a Google prebuilt Docker container using the Vertex SDK, and then do a prediction with explanations on the deployed model by sending data. You can alternatively create custom models using `gcloud` command-line tool or online using Cloud Console.\n",
|
||||
"In this tutorial, you learn how to create a custom model from a Python script in a Google prebuilt Docker container using the Vertex AI SDK, and then do a prediction with explanations on the deployed model by sending data. You can alternatively create custom models using `gcloud` command-line tool or online using Cloud Console.\n",
|
||||
"\n",
|
||||
"This tutorial uses the following Google Cloud ML services:\n",
|
||||
"\n",
|
||||
"- `Vertex AI Training`\n",
|
||||
"- `Vertex AI Online Prediction`\n",
|
||||
"- `Vertex Explainable AI`\n",
|
||||
"- `Vertex AI Model` resource\n",
|
||||
"- `Vertex AI Endpoint` resource\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"The steps performed include:\n",
|
||||
"\n",
|
||||
|
||||
@@ -81,6 +81,12 @@
|
||||
"\n",
|
||||
"In this notebook, you learn how to train custom embeddings using Vertex AI Pipelines and deploy the model for serving. \n",
|
||||
"\n",
|
||||
"This tutorial uses the following Google Cloud ML services:\n",
|
||||
"\n",
|
||||
"- `Vertex AI Pipelines`\n",
|
||||
"- `Vertex AI Training`\n",
|
||||
"- `Swivel builtin algorithm`\n",
|
||||
"\n",
|
||||
"The steps performed include:\n",
|
||||
"\n",
|
||||
"1. **Setup**: Importing the required libraries and setting your global variables.\n",
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
"source": [
|
||||
"## Overview\n",
|
||||
"\n",
|
||||
"This example demonstrates how to use the GCP ANN Service. It is a high scale, low latency solution, to find similar vectors (or more specifically \"embeddings\") for a large corpus. Moreover, it is a fully managed offering, further reducing operational overhead. It is built upon [Approximate Nearest Neighbor (ANN) technology](https://ai.googleblog.com/2020/07/announcing-scann-efficient-vector.html) developed by Google Research."
|
||||
"This example demonstrates how to use the Vertex AI ANN Service. It is a high scale, low latency solution, to find similar vectors (or more specifically \"embeddings\") for a large corpus. Moreover, it is a fully managed offering, further reducing operational overhead. It is built upon [Approximate Nearest Neighbor (ANN) technology](https://ai.googleblog.com/2020/07/announcing-scann-efficient-vector.html) developed by Google Research."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -73,6 +73,10 @@
|
||||
"\n",
|
||||
"In this notebook, you learn how to create Approximate Nearest Neighbor (ANN) Index, query against indexes, and validate the performance of the index. \n",
|
||||
"\n",
|
||||
"This tutorial uses the following Google Cloud ML services:\n",
|
||||
"\n",
|
||||
"- `Vertex AI Matching Engine`\n",
|
||||
"\n",
|
||||
"The steps performed include:\n",
|
||||
"\n",
|
||||
"* Create ANN Index and Brute Force Index\n",
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
"id": "JAPoU8Sm5E6e"
|
||||
},
|
||||
"source": [
|
||||
"# Introduction to builtin Two-towers embedding algorithm\n",
|
||||
"# Introduction to builtin Two-Towers embedding algorithm\n",
|
||||
"\n",
|
||||
"<table align=\"left\">\n",
|
||||
" <td>\n",
|
||||
@@ -73,7 +73,13 @@
|
||||
"source": [
|
||||
"### Objective\n",
|
||||
"\n",
|
||||
"In this notebook, you learn how to run the two-tower model.\n",
|
||||
"In this notebook, you learn how to run the Two-Tower model.\n",
|
||||
"\n",
|
||||
"This tutorial uses the following Google Cloud ML services:\n",
|
||||
"\n",
|
||||
"- `Vertex AI Training`\n",
|
||||
"- `Vertex AI Prediction`\n",
|
||||
"- `Two-Tower builtin algorithm`\n",
|
||||
"\n",
|
||||
"The steps performed include:\n",
|
||||
"1. **Setup**: Importing the required libraries and setting your global variables.\n",
|
||||
|
||||
@@ -74,6 +74,10 @@
|
||||
"\n",
|
||||
"In this notebook, you learn how to track artifacts and metrics with `Vertex ML Metadata` in `Vertex AI Pipeline` runs.\n",
|
||||
"\n",
|
||||
"This tutorial uses the following Google Cloud ML services and resources:\n",
|
||||
"\n",
|
||||
"- Vertex AI Pipelines\n",
|
||||
"- Vertex ML Metadata\n",
|
||||
"\n",
|
||||
"The steps performed include:\n",
|
||||
"\n",
|
||||
|
||||
@@ -76,6 +76,13 @@
|
||||
"\n",
|
||||
"In this tutorial, you learn how to provide a sample plotting tool to visualize the output of TabNet, which is helpful in explaining the algorithm. \n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"This tutorial uses the following Google Cloud ML services and resources:\n",
|
||||
"\n",
|
||||
"- Vertex Explainable AI\n",
|
||||
"- TabNet builtin algorithm\n",
|
||||
"\n",
|
||||
"The steps performed are:\n",
|
||||
"* Setup the the project.\n",
|
||||
"* Download the prediction data of pretrain model onf Syn2 data.\n",
|
||||
|
||||
@@ -78,6 +78,13 @@
|
||||
"\n",
|
||||
"In this notebook, you learn how to run TabNet model on Vertex AI.\n",
|
||||
"\n",
|
||||
"This tutorial uses the following Google Cloud ML services and resources:\n",
|
||||
"\n",
|
||||
"- Vertex AI Training\n",
|
||||
"- Vertex AI Hyperparameter Tuning\n",
|
||||
"- TabNet builtin algorithm\n",
|
||||
"- BigQuery\n",
|
||||
"\n",
|
||||
"The steps performed are:\n",
|
||||
"1. **Setup**: Importing the required libraries and setting your global variables.\n",
|
||||
"2. **Configure parameters**: Setting the appropriate parameter values for the training job.\n",
|
||||
|
||||
+6
-1
@@ -29,7 +29,7 @@
|
||||
"id": "ed2pOXQMb8fY"
|
||||
},
|
||||
"source": [
|
||||
"# Vertex AI TensorBoard Custom Training with Custom Container\n",
|
||||
"# Vertex AI TensorBoard Custom Training with custom container\n",
|
||||
"\n",
|
||||
"<table align=\"left\">\n",
|
||||
" <td>\n",
|
||||
@@ -102,6 +102,11 @@
|
||||
"\n",
|
||||
"In this tutorial, you learn how to create a custom training job using custom containers, and monitor your training process on Vertex AI TensorBoard in near real time.\n",
|
||||
"\n",
|
||||
"This tutorial uses the following Google Cloud ML services and resources:\n",
|
||||
"\n",
|
||||
"- Vertex AI Training\n",
|
||||
"- Vertex AI TensorBoard\n",
|
||||
"\n",
|
||||
"The steps performed include:\n",
|
||||
"\n",
|
||||
"* Create docker repository & config.\n",
|
||||
|
||||
+5
@@ -102,6 +102,11 @@
|
||||
"\n",
|
||||
"In this tutorial, you learn how to create a custom training job using prebuilt containers, and monitor your training process on Vertex AI TensorBoard in near real time.\n",
|
||||
"\n",
|
||||
"This tutorial uses the following Google Cloud ML services and resources:\n",
|
||||
"\n",
|
||||
"- Vertex AI Training\n",
|
||||
"- Vertex AI TensorBoard\n",
|
||||
"\n",
|
||||
"The steps performed include:\n",
|
||||
"\n",
|
||||
"* Setup service account and Google Cloud Storage buckets.\n",
|
||||
|
||||
@@ -101,6 +101,12 @@
|
||||
"\n",
|
||||
"In this tutorial, you learn how to create a training pipeline using the KFP SDK, execute the pipeline in Vertex AI Pipelines, and monitor your training process on Vertex AI TensorBoard in near real time.\n",
|
||||
"\n",
|
||||
"This tutorial uses the following Google Cloud ML services and resources:\n",
|
||||
"\n",
|
||||
"- Vertex AI Training\n",
|
||||
"- Vertex AI TensorBoard\n",
|
||||
"- Vertex AI Pipelines\n",
|
||||
"\n",
|
||||
"The steps performed include:\n",
|
||||
"\n",
|
||||
"* Setup a service account and Google Cloud Storage buckets.\n",
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
|
||||
### sentiment_analysis
|
||||
|
||||
|
||||
[Sentiment Analysis using AutoML Natural Language and Vertex AI](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/workbench/sentiment_analysis/Sentiment_Analysis.ipynb)
|
||||
|
||||
```
|
||||
<a name="section-2"></a>
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
### exploratory_data_analysis
|
||||
|
||||
|
||||
[Interactive exploratory analysis of BigQuery data in a notebook](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/workbench/exploratory_data_analysis/explore_data_in_bigquery_with_workbench.ipynb)
|
||||
|
||||
```
|
||||
Learn about various ways to explore and gain insights from BigQuery data in a Jupyter notebook environment.
|
||||
|
||||
The steps performed include:
|
||||
|
||||
- Using Python & SQL to query public data in BigQuery
|
||||
- Exploring the dataset using BigQuery INFORMATION_SCHEMA
|
||||
- Creating interactive elements to help explore interesting parts of the data
|
||||
- Doing some exploratory correlation and time series analysis
|
||||
- Creating static and interactive outputs (data tables and plots) in the notebook
|
||||
- Saving some outputs to Cloud Storage
|
||||
|
||||
```
|
||||
|
||||
|
||||
### demand_forecasting
|
||||
|
||||
|
||||
[Forecasting retail demand with Vertex AI and BigQuery ML](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/workbench/demand_forecasting/forecasting-retail-demand.ipynb)
|
||||
|
||||
```
|
||||
Learn how to build ARIMA (Autoregressive integrated moving average) model from BigQuery ML on retail data
|
||||
|
||||
The steps performed include:
|
||||
|
||||
* Explore data
|
||||
* Model with BigQuery and the ARIMA model
|
||||
* Evaluate the model
|
||||
* Evaluate the model results using BigQuery ML (on training data)
|
||||
* Evalute the model results - MAE, MAPE, MSE, RMSE (on test data)
|
||||
* Use the executor feature
|
||||
|
||||
```
|
||||
|
||||
|
||||
### predictive_maintainance
|
||||
|
||||
|
||||
[Predictive Maintenance using Vertex AI](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/workbench/predictive_maintainance/predictive_maintenance_usecase.ipynb)
|
||||
|
||||
```
|
||||
<a name="section-2"></a>
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
### subscriber_churn_prediction
|
||||
|
||||
|
||||
[Telecom subscriber churn prediction on Vertex AI](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/workbench/subscriber_churn_prediction/telecom-subscriber-churn-prediction.ipynb)
|
||||
|
||||
```
|
||||
This tutorial shows you how to do exploratory data analysis, preprocess data, train, deploy and get predictions from a churn prediction model on a tabular churn dataset.
|
||||
|
||||
The steps performed include:
|
||||
|
||||
- Load data from a Cloud Storage path
|
||||
- Perform exploratory data analysis (EDA)
|
||||
- Preprocess the data
|
||||
- Train a scikit-learn model
|
||||
- Evaluate the scikit-learn model
|
||||
- Save the model to a Cloud Storage path
|
||||
- Create a model and an endpoint in Vertex AI
|
||||
- Deploy the trained model to an endpoint
|
||||
- Generate predictions and explanations on test data from the hosted model
|
||||
- Undeploy the model resource
|
||||
|
||||
```
|
||||
|
||||
|
||||
### spark
|
||||
|
||||
|
||||
[SparkML with Dataproc and BigQuery](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/workbench/spark/spark_ml.ipynb)
|
||||
|
||||
```
|
||||
This tutorial runs an Apache SparkML job that fetches data from the BigQuery dataset, performs exploratory data analysis, cleans the data, executes feature engineering, trains the model, evaluates the model, outputs results, and saves the model to a Cloud Storage bucket.
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
[Digest and analyze data from BigQuery with Dataproc](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/workbench/spark/spark_bigquery.ipynb)
|
||||
|
||||
```
|
||||
This notebook tutorial runs an Apache Spark job that fetches data from the BigQuery "GitHub Activity Data" dataset, queries the data, and then writes the results back to BigQuery.
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
### ads_targetting
|
||||
|
||||
|
||||
[Train a multi-class classification model for ads-targeting](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/workbench/ads_targetting/training-multi-class-classification-model-for-ads-targeting-usecase.ipynb)
|
||||
|
||||
```
|
||||
Learn how to collect data from BigQuery, preprocess it, and train a multi-class classification model on an e-commerce dataset.
|
||||
|
||||
The steps performed include:
|
||||
|
||||
- Fetch the required data from BigQuery
|
||||
- Preprocess the data
|
||||
- Train a TensorFlow (>=2.4) classification model
|
||||
- Evaluate the loss for the trained model
|
||||
- Automate the notebook execution using the executor feature
|
||||
- Save the model to a Cloud Storage path
|
||||
- Clean up the created resources
|
||||
|
||||
```
|
||||
|
||||
|
||||
### inventory-prediction
|
||||
|
||||
|
||||
[Inventory prediction on ecommerce data using Vertex AI](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/workbench/inventory-prediction/inventory_prediction.ipynb)
|
||||
|
||||
```
|
||||
This tutorial shows you how to do exploratory data analysis, preprocess data, train model, evaluate model, deploy model, configure What-If Tool.
|
||||
|
||||
The steps performed include:
|
||||
|
||||
* Load the dataset from BigQuery using the "BigQuery in Notebooks" integration.
|
||||
* Analyze the dataset.
|
||||
* Preprocess the features in the dataset.
|
||||
* Build a random forest classifier model that predicts whether a product will get sold in the next 60 days.
|
||||
* Evaluate the model.
|
||||
* Deploy the model using Vertex AI.
|
||||
* Configure and test with the What-If Tool.
|
||||
|
||||
```
|
||||
|
||||
|
||||
### fraud_detection
|
||||
|
||||
|
||||
[Build a fraud detection model on Vertex AI](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/workbench/fraud_detection/fraud-detection-model.ipynb)
|
||||
|
||||
```
|
||||
This tutorial demonstrates data analysis and model-building using a synthetic financial dataset.
|
||||
|
||||
The steps performed include:
|
||||
|
||||
- Installation of required libraries
|
||||
- Reading the dataset from a Cloud Storage bucket
|
||||
- Performing exploratory analysis on the dataset
|
||||
- Preprocessing the dataset
|
||||
- Training a random forest model using scikit-learn
|
||||
- Saving the model to a Cloud Storage bucket
|
||||
- Creating a Vertex AI model resource and deploying to an endpoint
|
||||
- Running the What-If Tool on test data
|
||||
- Un-deploying the model and cleaning up the model resources
|
||||
|
||||
```
|
||||
|
||||
|
||||
### chicago_taxi_fare_prediction
|
||||
|
||||
|
||||
[Taxi fare prediction using the Chicago Taxi Trips dataset](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/workbench/chicago_taxi_fare_prediction/chicago_taxi_fare_prediction.ipynb)
|
||||
|
||||
```
|
||||
The goal of this notebook is to provide an overview on the latest Vertex AI features like **Explainable AI** and **BigQuery in Notebooks** by trying to solve a taxi fare prediction problem.
|
||||
|
||||
The steps performed include:
|
||||
|
||||
- Loading the dataset using "BigQuery in Notebooks".
|
||||
- Performing exploratory data analysis on the dataset.
|
||||
- Feature selection and preprocessing.
|
||||
- Building a linear regression model using scikit-learn.
|
||||
- Configuring the model for Vertex Explainable AI.
|
||||
- Deploying the model to Vertex AI.
|
||||
- Testing the deployed model.
|
||||
- Clean up.
|
||||
|
||||
```
|
||||
|
||||
+28
-7
@@ -56,13 +56,20 @@
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "tvgnzT1CKxrO"
|
||||
"id": "780762457db0"
|
||||
},
|
||||
"source": [
|
||||
"## Overview\n",
|
||||
"\n",
|
||||
"This notebook is written for data analysts and data scientists who have data in BigQuery and want to perform exploratory data analysis to gather insights from that data in an interactive environment.\n",
|
||||
"\n",
|
||||
"This notebook is written for data analysts and data scientists who have data in BigQuery and want to perform exploratory data analysis to gather insights from that data in an interactive environment."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "tvgnzT1CKxrO"
|
||||
},
|
||||
"source": [
|
||||
"### Objective\n",
|
||||
"\n",
|
||||
"In this tutorial, you learn about various ways to explore and gain insights from BigQuery data in a Jupyter notebook environment.\n",
|
||||
@@ -80,12 +87,26 @@
|
||||
"- Creating interactive elements to help explore interesting parts of the data\n",
|
||||
"- Doing some exploratory correlation and time series analysis\n",
|
||||
"- Creating static and interactive outputs (data tables and plots) in the notebook\n",
|
||||
"- Saving some outputs to Cloud Storage\n",
|
||||
"\n",
|
||||
"- Saving some outputs to Cloud Storage"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "65aa4ba05101"
|
||||
},
|
||||
"source": [
|
||||
"### Dataset\n",
|
||||
"\n",
|
||||
"The dataset, [available publicly on BigQuery](https://console.cloud.google.com/bigquery?project=bigquery-public-data&d=ga4_obfuscated_sample_ecommerce&p=bigquery-public-data&page=dataset), comes from obfuscated [Google Analytics 4 (GA4) data](https://developers.google.com/analytics/bigquery/web-ecommerce-demo-dataset) from the Google Merchandise Store.\n",
|
||||
"\n",
|
||||
"The dataset, [available publicly on BigQuery](https://console.cloud.google.com/bigquery?project=bigquery-public-data&d=ga4_obfuscated_sample_ecommerce&p=bigquery-public-data&page=dataset), comes from obfuscated [Google Analytics 4 (GA4) data](https://developers.google.com/analytics/bigquery/web-ecommerce-demo-dataset) from the Google Merchandise Store."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "fd44a67414d5"
|
||||
},
|
||||
"source": [
|
||||
"### Costs \n",
|
||||
"\n",
|
||||
"This tutorial uses billable components of Google Cloud:\n",
|
||||
|
||||
+4
-4
@@ -29,7 +29,7 @@
|
||||
"id": "py8EYwG_91Pn"
|
||||
},
|
||||
"source": [
|
||||
"# Churn prediction for game developers using Google Analytics 4 (GA4) and BigQuery ML\n",
|
||||
"# Churn prediction for game developers using Google Analytics 4 and BigQuery ML\n",
|
||||
"\n",
|
||||
"<table align=\"left\">\n",
|
||||
"\n",
|
||||
@@ -99,7 +99,7 @@
|
||||
"id": "sH0CZGku0BPp"
|
||||
},
|
||||
"source": [
|
||||
"## Objective\n",
|
||||
"### Objective\n",
|
||||
"<a name=\"section-2\"></a>\n",
|
||||
"\n",
|
||||
"In this tutorial, you learn how to train, evaluate a propensity model in BigQuery ML.\n",
|
||||
@@ -122,7 +122,7 @@
|
||||
"id": "b07fc9940120"
|
||||
},
|
||||
"source": [
|
||||
"## Dataset\n",
|
||||
"### Dataset\n",
|
||||
"<a name=\"section-3\"></a>\n",
|
||||
"\n",
|
||||
"This notebook uses [this public BigQuery dataset](https://console.cloud.google.com/bigquery?p=firebase-public-project&d=analytics_153293282&t=events_20181003&page=table), which contains raw event data from a real mobile gaming app called Flood It! ([Android app](https://play.google.com/store/apps/details?id=com.labpixies.flood), [iOS app](https://itunes.apple.com/us/app/flood-it!/id476943146?mt=8)). The [data schema](https://support.google.com/analytics/answer/7029846) originates from Google Analytics for Firebase, but is the same schema as [Google Analytics 4](https://support.google.com/analytics/answer/9358801); the techniques in this notebook can be applied to either Google Analytics for Firebase or Google Analytics 4 data.\n",
|
||||
@@ -138,7 +138,7 @@
|
||||
"id": "589ffe790261"
|
||||
},
|
||||
"source": [
|
||||
"## Costs\n",
|
||||
"### Costs\n",
|
||||
"<a name=\"section-4\"></a>\n",
|
||||
"\n",
|
||||
"This tutorial uses the following billable components of Google Cloud:\n",
|
||||
|
||||
+6
-1
@@ -93,7 +93,12 @@
|
||||
"### Objective\n",
|
||||
"<a name=\"section-2\"></a>\n",
|
||||
"\n",
|
||||
"The objectives of this notebook include:\n",
|
||||
"This tutorial uses the following Google Cloud ML services:\n",
|
||||
"\n",
|
||||
"- `Vertex AI Training`\n",
|
||||
"- `Vertex AI Model Evaluation`\n",
|
||||
"\n",
|
||||
"The steps performed are:\n",
|
||||
"\n",
|
||||
"- Loading the required dataset from a Cloud Storage bucket.\n",
|
||||
"- Analyzing the fields present in the dataset.\n",
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
"id": "71f69cfdff2b"
|
||||
},
|
||||
"source": [
|
||||
"## Objective\n",
|
||||
"### Objective\n",
|
||||
"<a name=\"section-2\"></a>\n",
|
||||
"\n",
|
||||
"The objective of this notebook is to build a pricing optimization model using BigQuery ML. The following steps have been followed: \n",
|
||||
@@ -122,7 +122,7 @@
|
||||
"id": "d20422a5c34d"
|
||||
},
|
||||
"source": [
|
||||
"## Dataset\n",
|
||||
"### Dataset\n",
|
||||
"<a name=\"section-3\"></a>\n",
|
||||
"\n",
|
||||
"The dataset used in this notebook is a part of the [CDM Pricing dataset](https://github.com/trifacta/trifacta-google-cloud/blob/main/design-pattern-pricing-optimization/CDM_Pricing_large_table.csv), which consists of product sales information on specified dates."
|
||||
@@ -134,7 +134,7 @@
|
||||
"id": "c05bcd30859d"
|
||||
},
|
||||
"source": [
|
||||
"## Costs\n",
|
||||
"### Costs\n",
|
||||
"<a name=\"section-4\"></a>\n",
|
||||
"\n",
|
||||
"This tutorial uses the following billable components of Google Cloud:\n",
|
||||
|
||||
@@ -97,13 +97,20 @@
|
||||
"### Objective\n",
|
||||
"<a name=\"section-2\"></a>\n",
|
||||
"\n",
|
||||
"The objectives of this notebook include:\n",
|
||||
"This tutorial uses the following Google Cloud ML services:\n",
|
||||
"\n",
|
||||
"- `Vertex AI Dataset`\n",
|
||||
"- `Vertex AI Model`\n",
|
||||
"- `AutoML training`\n",
|
||||
"- `Vertex AI Prediction`\n",
|
||||
"\n",
|
||||
"The steps performed are:\n",
|
||||
"\n",
|
||||
"- Loading the required data. \n",
|
||||
"- Preprocessing the data.\n",
|
||||
"- Selecting the required data for the model.\n",
|
||||
"- Loading the dataset into Vertex AI managed datasets.\n",
|
||||
"- Training a sentiment model using AutoML Natural Language.\n",
|
||||
"- Training a sentiment model using AutoML Text training.\n",
|
||||
"- Evaluating the model.\n",
|
||||
"- Deploying the model on Vertex AI.\n",
|
||||
"- Getting predictions.\n",
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
"id": "JAPoU8Sm5E6e"
|
||||
},
|
||||
"source": [
|
||||
"# Digest and analyze data from BigQuery with Dataproc\n",
|
||||
"\n",
|
||||
"<table align=\"left\">\n",
|
||||
"\n",
|
||||
" <td>\n",
|
||||
@@ -38,6 +40,11 @@
|
||||
" </a>\n",
|
||||
" </td>\n",
|
||||
" <td>\n",
|
||||
" <a href=\"https://colab.research.google.com/github/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/workbench/spark/spark_bigquery.ipynb\">\n",
|
||||
" <img src=\"https://cloud.google.com/ml-engine/images/colab-logo-32px.png\" alt=\"Colab logo\"> Run in Colab\n",
|
||||
" </a>\n",
|
||||
" </td>\n",
|
||||
" <td>\n",
|
||||
"<a href=\"https://console.cloud.google.com/vertex-ai/workbench/deploy-notebook?download_url=https://raw.githubusercontent.com/GoogleCloudPlatform/vertex-ai-samples/main/notebooks/official/workbench/spark/spark_bigquery.ipynb\" target='_blank'>\n",
|
||||
" <img src=\"https://lh3.googleusercontent.com/UiNooY4LUgW_oTvpsNhPpQzsstV5W8F7rYgxgGBD85cWJoLmrOzhVs_ksK_vgx40SHs7jCqkTkCk=e14-rj-sc0xffffff-h130-w32\" alt=\"Vertex AI logo\">\n",
|
||||
" Open in Vertex AI Workbench\n",
|
||||
@@ -59,17 +66,6 @@
|
||||
"To run this notebook, click the link `Open in Vertex AI Workbench` above."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "tvgnzT1CKxrO"
|
||||
},
|
||||
"source": [
|
||||
"### Dataset\n",
|
||||
"\n",
|
||||
"The [GitHub Activity Data](https://console.cloud.google.com/marketplace/product/github/github-repos) dataset is available in [BigQuery Public Datasets](https://cloud.google.com/bigquery/public-data), and provides free querying of up to 1TB of data each month. It contains data on two different types of repositories: \"polyglot\" repos, which support multiple programming language files, and \"monoglot\" repos, which support one programming language."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
@@ -80,7 +76,12 @@
|
||||
"\n",
|
||||
"This notebook tutorial runs an Apache Spark job that fetches data from the BigQuery \"GitHub Activity Data\" dataset, queries the data, and then writes the results back to BigQuery. This job sequence represents a common data engineering use case: ingesting, transforming, and querying data, and then writing the output to a database. It also demonstrates how to submit an Apache Spark job to Dataproc.\n",
|
||||
"\n",
|
||||
"This notebook tutorial performs the following steps:\n",
|
||||
"This tutorial uses the following Google Cloud ML services:\n",
|
||||
"\n",
|
||||
"- `Dataproc`\n",
|
||||
"- `BigQuery`\n",
|
||||
"\n",
|
||||
"The steps performed are:\n",
|
||||
"\n",
|
||||
"- Setting up a Google Cloud project and Dataproc cluster.\n",
|
||||
"- Configuring the spark-bigquery-connector.\n",
|
||||
@@ -93,6 +94,17 @@
|
||||
"- Deleting the resources created for this notebook tutorial."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "tvgnzT1CKxrO"
|
||||
},
|
||||
"source": [
|
||||
"### Dataset\n",
|
||||
"\n",
|
||||
"The [GitHub Activity Data](https://console.cloud.google.com/marketplace/product/github/github-repos) dataset is available in [BigQuery Public Datasets](https://cloud.google.com/bigquery/public-data), and provides free querying of up to 1TB of data each month. It contains data on two different types of repositories: \"polyglot\" repos, which support multiple programming language files, and \"monoglot\" repos, which support one programming language."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
"id": "XoEqT2Y4DJmf"
|
||||
},
|
||||
"source": [
|
||||
"# SparkML with Dataproc and BigQuery\n",
|
||||
"\n",
|
||||
"<table align=\"left\">\n",
|
||||
"\n",
|
||||
" <td>\n",
|
||||
@@ -38,6 +40,11 @@
|
||||
" </a>\n",
|
||||
" </td>\n",
|
||||
" <td>\n",
|
||||
" <a href=\"https://colab.research.google.com/github/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/workbench/spark/spark_ml.ipynb\">\n",
|
||||
" <img src=\"https://cloud.google.com/ml-engine/images/colab-logo-32px.png\" alt=\"Colab logo\"> Run in Colab\n",
|
||||
" </a>\n",
|
||||
" </td>\n",
|
||||
" <td>\n",
|
||||
"<a href=\"https://console.cloud.google.com/vertex-ai/workbench/deploy-notebook?download_url=https://raw.githubusercontent.com/GoogleCloudPlatform/vertex-ai-samples/main/notebooks/official/workbench/spark/spark_ml.ipynb\" target='_blank'>\n",
|
||||
" <img src=\"https://lh3.googleusercontent.com/UiNooY4LUgW_oTvpsNhPpQzsstV5W8F7rYgxgGBD85cWJoLmrOzhVs_ksK_vgx40SHs7jCqkTkCk=e14-rj-sc0xffffff-h130-w32\" alt=\"Vertex AI logo\">\n",
|
||||
" Open in Vertex AI Workbench\n",
|
||||
@@ -57,17 +64,6 @@
|
||||
"This notebook tutorial runs Apache SparkML jobs with Dataproc and BigQuery to exemplify a common machine learning pipeline use case: data ingestion and cleaning, feature engineering, modeling, and model evaluation."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "XoEqT2Y4DJmf"
|
||||
},
|
||||
"source": [
|
||||
"### Dataset\n",
|
||||
"\n",
|
||||
"The [NYC TLC (Taxi and Limousine Commission) Trips](https://console.cloud.google.com/marketplace/product/city-of-new-york/nyc-tlc-trips) (New York taxi and limosine trips data) and [NYC Citi Bike Trips](https://console.cloud.google.com/marketplace/product/city-of-new-york/nyc-citi-bike) (NYC public bicycle sharing system data) datasets are available in [BigQuery Public Datasets](https://cloud.google.com/bigquery/public-data). BigQuery provides free querying of up to 1TB of data each month."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
@@ -78,7 +74,13 @@
|
||||
"\n",
|
||||
"This tutorial runs an Apache SparkML job that fetches data from the BigQuery dataset, performs exploratory data analysis, cleans the data, executes feature engineering, trains the model, evaluates the model, outputs results, and saves the model to a Cloud Storage bucket.\n",
|
||||
"\n",
|
||||
"This notebook tutorial performs the following steps:\n",
|
||||
"This tutorial uses the following Google Cloud ML services:\n",
|
||||
"\n",
|
||||
"- `Dataproc`\n",
|
||||
"- `BigQuery`\n",
|
||||
"- `Vertex AI Training`\n",
|
||||
"\n",
|
||||
"The steps performed are:\n",
|
||||
"\n",
|
||||
"- Sets up a Google Cloud project and Dataproc cluster.\n",
|
||||
"- Creates a Cloud Storage bucket and a BigQuery dataset.\n",
|
||||
@@ -94,6 +96,17 @@
|
||||
"- Deletes the resources created for the tutorial."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "XoEqT2Y4DJmf"
|
||||
},
|
||||
"source": [
|
||||
"### Dataset\n",
|
||||
"\n",
|
||||
"The [NYC TLC (Taxi and Limousine Commission) Trips](https://console.cloud.google.com/marketplace/product/city-of-new-york/nyc-tlc-trips) (New York taxi and limosine trips data) and [NYC Citi Bike Trips](https://console.cloud.google.com/marketplace/product/city-of-new-york/nyc-citi-bike) (NYC public bicycle sharing system data) datasets are available in [BigQuery Public Datasets](https://cloud.google.com/bigquery/public-data). BigQuery provides free querying of up to 1TB of data each month."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
|
||||
Reference in New Issue
Block a user