chore: Replace 'prediction' with 'inference' per urgent rebranding request (#4231)

This commit is contained in:
Mark
2025-09-10 23:32:32 +00:00
committed by GitHub
parent 86ce1576d2
commit 9c8a7808bf
@@ -29,7 +29,7 @@
"id": "title"
},
"source": [
"# Custom model batch prediction with feature filtering \n",
"# Custom model batch inference with feature filtering \n",
"<table align=\"left\">\n",
" <td style=\"text-align: center\">\n",
" <a href=\"https://colab.research.google.com/github/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/prediction/custom_batch_prediction_feature_filter.ipynb\">\n",
@@ -63,9 +63,9 @@
"## Overview\n",
"\n",
"\n",
"This tutorial demonstrates how to use the Vertex AI SDK for Python to train a custom tabular classification model and perform batch prediction with feature filtering. This means that you can run batch prediction on a list of selected features or exclude a list of features from prediction.\n",
"This tutorial demonstrates how to use the Vertex AI SDK for Python to train a custom tabular classification model and perform batch inference with feature filtering. This means that you can run batch inference on a list of selected features or exclude a list of features from inference.\n",
"\n",
"Learn more about [Vertex AI Batch Prediction](https://cloud.google.com/vertex-ai/docs/tabular-data/classification-regression/get-batch-predictions)."
"Learn more about [Vertex AI Batch Inference](https://cloud.google.com/vertex-ai/docs/tabular-data/classification-regression/get-batch-predictions)."
]
},
{
@@ -76,7 +76,7 @@
"source": [
"### Objective\n",
"\n",
"In this notebook, you learn how to create a custom-trained model from a Python script in a Docker container using the Vertex AI SDK for Python, and then run a batch prediction job by including or excluding a list of features. \n",
"In this notebook, you learn how to create a custom-trained model from a Python script in a Docker container using the Vertex AI SDK for Python, and then run a batch inference job by including or excluding a list of features. \n",
"\n",
"This tutorial uses the following Google Cloud ML services and resources:\n",
"\n",
@@ -84,7 +84,7 @@
"- Cloud Storage\n",
"- Vertex AI managed Datasets\n",
"- Vertex AI Training\n",
"- Vertex AI BatchPrediction\n",
"- Vertex AI Batch Inference\n",
"\n",
"The steps performed include:\n",
"\n",
@@ -374,9 +374,9 @@
"source": [
"### Set pre-built containers\n",
"\n",
"Vertex AI provides pre-built containers to run training and prediction.\n",
"Vertex AI provides pre-built containers to run training and inference.\n",
"\n",
"For the latest list, see [Pre-built containers for training](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers) and [Pre-built containers for prediction](https://cloud.google.com/vertex-ai/docs/predictions/pre-built-containers)"
"For the latest list, see [Pre-built containers for training](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers) and [Pre-built containers for inference](https://cloud.google.com/vertex-ai/docs/predictions/pre-built-containers)"
]
},
{
@@ -407,7 +407,7 @@
"\n",
"To improve the convergence of the custom deep learning model, normalize the data. To prepare for this, calculate the mean and standard deviation for each numeric column.\n",
"\n",
"Pass these summary statistics to the training script to normalize the data before training. Later, during prediction, use these summary statistics again to normalize the testing data."
"Pass these summary statistics to the training script to normalize the data before training. Later, during inference, use these summary statistics again to normalize the testing data."
]
},
{
@@ -958,16 +958,16 @@
"id": "make_prediction"
},
"source": [
"### Send Batch Prediction job request with feature filtering (instanceConfig field)\n",
"### Send Batch job request with feature filtering (instanceConfig field)\n",
"\n",
"Now that the model is ready, you can send batch prediction request directly from the model resource without needing to deploy the model to an endpoint. \n",
"Now that the model is ready, you can send batch request directly from the model resource without needing to deploy the model to an endpoint. \n",
"\n",
"Sometimes, your input data does not match the data format that the predictor accepts. Feature filtering lets you either exclude certain fields (such as identifiers or metadata) that are in the input data from your prediction request, or include only a subset of fields from the input data in your prediction request, without having to do any custom pre/post-processing in the prediction container.\n",
"Sometimes, your input data does not match the data format that the predictor accepts. Feature filtering lets you either exclude certain fields (such as identifiers or metadata) that are in the input data from your request, or include only a subset of fields from the input data in your request, without having to do any custom pre/post-processing in the prediction container.\n",
"You can filter and/or transform your batch input \n",
"\n",
"In this notebook you learn how to send batch prediction request by including or excluding a list of features by specifying `instanceConfig` in your `BatchPredictionJob` request (**v1beta1 only**).\n",
"In this notebook you learn how to send batch request by including or excluding a list of features by specifying `instanceConfig` in your `BatchPredictionJob` request (**v1beta1 only**).\n",
"\n",
"Learn more about [Prediction on Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/overview)<br>\n",
"Learn more about [Inference on Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/overview)<br>\n",
"Learn more about [feature filtering](https://cloud.google.com/vertex-ai/docs/predictions/get-predictions#filter_and_transform_input_data_preview)"
]
},
@@ -982,7 +982,7 @@
"Prepare test data by normalizing it and converting categorical values to numeric values.\n",
"You must normalize these values in the same way that your normalized training data.\n",
"\n",
"In this example, we add an extra column called `id` to the test dataset which was not used for training. We show how to exclude this feature at prediction. \n",
"In this example, we add an extra column called `id` to the test dataset which was not used for training. We show how to exclude this feature. \n",
"Here, you perform testing with the same dataset that you used for training. In practice, you generally want to use a separate test dataset to verify your results."
]
},
@@ -1181,18 +1181,18 @@
"source": [
"### Send the BatchPredictionJob request using REST API\n",
"\n",
"Now that you have test data, you can use it to send a batch prediction request using REST API. To do that you need to create a `JSON` request with the following information:\n",
"Now that you have test data, you can use it to send a request using REST API. To do that you need to create a `JSON` request with the following information:\n",
"\n",
"- `BATCH_JOB_NAME`: Display name for the batch prediction job.\n",
"- `MODEL_URI`: The URI for the Model resource to use for making predictions.\n",
"- `BATCH_JOB_NAME`: Display name for the batch job.\n",
"- `MODEL_URI`: The URI for the Model resource to use for making inferences.\n",
"- `INPUT_FORMAT`: The format of your input data: bigquery, jsonl, csv, tf-record, tf-record-gzip, or file-list.\n",
"- `INPUT_URI`: Cloud Storage URI of your input data. May contain wildcards.\n",
"- `OUTPUT_URI`: Cloud Storage URI of a directory where you want Vertex AI to save output.\n",
"- `MACHINE_TYPE`: The machine resources to be used for this batch prediction job.\n",
"- `MACHINE_TYPE`: The machine resources to be used for this batch inference job.\n",
"\n",
"In this example, we create two versions of the same JSON request: one with `excludedFields` and the other with `includeFields` to show how to include or exclude certain features. Note that these two requests do the same job in this example!\n",
"\n",
"Learn more about [request a batch prediction](https://cloud.google.com/vertex-ai/docs/predictions/get-predictions#api_1)<br>\n",
"Learn more about [request a batch inference](https://cloud.google.com/vertex-ai/docs/predictions/get-predictions#api_1)<br>\n",
"Learn more about [instanceconfig](https://cloud.google.com/vertex-ai/docs/reference/rest/v1beta1/projects.locations.batchPredictionJobs#instanceconfig)"
]
},
@@ -1304,7 +1304,7 @@
"\n",
"#### Exclude fields\n",
"\n",
"Here, we send the request with `excludedFields`. After running the follwing cell you should receive a JSON response with your provided information. Then wait for the job to complete (you can check your job status on your Vertex AI Batch Predictions menu or use the Python SDK)."
"Here, we send the request with `excludedFields`. After running the follwing cell you should receive a JSON response with your provided information. Then wait for the job to complete (you can check your job status in the Cloud Console or using the Python SDK)."
]
},
{