Resource: BatchPredictionJob
A job that uses a Model
to produce predictions on multiple input instances
. If predictions for significant portion of the instances fail, the job may finish without attempting predictions for all remaining instances.
JSON representation |
---|
{ "name": string, "displayName": string, "model": string, "modelVersionId": string, "unmanagedContainerModel": { object ( |
Fields | |
---|---|
name |
Output only. Resource name of the BatchPredictionJob. |
displayName |
Required. The user-defined name of this BatchPredictionJob. |
model |
The name of the Model resource that produces the predictions via this job, must share the same ancestor Location. Starting this job has no impact on any existing deployments of the Model and their resources. Exactly one of model and unmanagedContainerModel must be set. The model resource name may contain version id or version alias to specify the version. Example: The model resource could also be a publisher model. Example: |
modelVersionId |
Output only. The version ID of the Model that produces the predictions via this job. |
unmanagedContainerModel |
Contains model information necessary to perform batch prediction without requiring uploading to model registry. Exactly one of model and unmanagedContainerModel must be set. |
inputConfig |
Required. Input configuration of the instances on which predictions are performed. The schema of any single instance may be specified via the |
instanceConfig |
Configuration for how to convert batch prediction input instances to the prediction instances that are sent to the Model. |
modelParameters |
The parameters that govern the predictions. The schema of the parameters may be specified via the |
outputConfig |
Required. The Configuration specifying where output predictions should be written. The schema of any single prediction may be specified as a concatenation of |
dedicatedResources |
The config of resources used by the Model during the batch prediction. If the Model |
serviceAccount |
The service account that the DeployedModel's container runs as. If not specified, a system generated one will be used, which has minimal permissions and the custom container, if used, may not have enough permission to access other Google Cloud resources. Users deploying the Model must have the |
manualBatchTuningParameters |
Immutable. Parameters configuring the batch behavior. Currently only applicable when |
generateExplanation |
Generate explanation with the batch prediction results. When set to
If this field is set to true, either the |
explanationSpec |
Explanation configuration for this BatchPredictionJob. Can be specified only if This value overrides the value of |
outputInfo |
Output only. Information further describing the output of this job. |
state |
Output only. The detailed state of the job. |
error |
Output only. Only populated when the job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED. |
partialFailures[] |
Output only. Partial failures encountered. For example, single files that can't be read. This field never exceeds 20 entries. Status details fields contain standard Google Cloud error details. |
resourcesConsumed |
Output only. Information about resources that had been consumed by this job. Provided in real time at best effort basis, as well as a final value once the job completes. Note: This field currently may be not populated for batch predictions that use AutoML Models. |
completionStats |
Output only. Statistics on completed and failed prediction instances. |
createTime |
Output only. time when the BatchPredictionJob was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
startTime |
Output only. time when the BatchPredictionJob for the first time entered the A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
endTime |
Output only. time when the BatchPredictionJob entered any of the following states: A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
updateTime |
Output only. time when the BatchPredictionJob was most recently updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
labels |
The labels with user-defined metadata to organize BatchPredictionJobs. label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. |
encryptionSpec |
Customer-managed encryption key options for a BatchPredictionJob. If this is set, then all resources created by the BatchPredictionJob will be encrypted with the provided encryption key. |
modelMonitoringConfig |
Model monitoring config will be used for analysis model behaviors, based on the input and output to the batch prediction job, as well as the provided training dataset. |
modelMonitoringStatsAnomalies[] |
Get batch prediction job monitoring statistics. |
modelMonitoringStatus |
Output only. The running status of the model monitoring pipeline. |
disableContainerLogging |
For custom-trained Models and AutoML Tabular Models, the container of the DeployedModel instances will send user can disable container logging by setting this flag to true. |
UnmanagedContainerModel
Contains model information necessary to perform batch prediction without requiring a full model import.
JSON representation |
---|
{ "artifactUri": string, "predictSchemata": { object ( |
Fields | |
---|---|
artifactUri |
The path to the directory containing the Model artifact and any of its supporting files. |
predictSchemata |
Contains the schemata used in Model's predictions and explanations |
containerSpec |
Input only. The specification of the container that is to be used when deploying this Model. |
InputConfig
Configures the input to BatchPredictionJob
. See Model.supported_input_storage_formats
for Model's supported input formats, and how instances should be expressed via any of them.
JSON representation |
---|
{ "instancesFormat": string, // Union field |
Fields | |
---|---|
instancesFormat |
Required. The format in which instances are given, must be one of the |
Union field source . Required. The source of the input. source can be only one of the following: |
|
gcsSource |
The Cloud Storage location for the input instances. |
bigquerySource |
The BigQuery location of the input table. The schema of the table should be in the format described by the given context OpenAPI Schema, if one is provided. The table may contain additional columns that are not described by the schema, and they will be ignored. |
InstanceConfig
Configuration defining how to transform batch prediction input instances to the instances that the Model accepts.
JSON representation |
---|
{ "instanceType": string, "keyField": string, "includedFields": [ string ], "excludedFields": [ string ] } |
Fields | |
---|---|
instanceType |
The format of the instance that the Model accepts. Vertex AI will convert compatible Supported values are:
If not specified, Vertex AI converts the batch prediction input as follows:
|
keyField |
The name of the field that is considered as a key. The values identified by the key field is not included in the transformed instances that is sent to the Model. This is similar to specifying this name of the field in
The input must be JSONL with objects at each line, CSV, BigQuery or TfRecord. |
includedFields[] |
Fields that will be included in the prediction instance that is sent to the Model. If When includedFields is populated, The input must be JSONL with objects at each line, BigQuery or TfRecord. |
excludedFields[] |
Fields that will be excluded in the prediction instance that is sent to the Model. Excluded will be attached to the batch prediction output if When excludedFields is populated, The input must be JSONL with objects at each line, BigQuery or TfRecord. |
OutputConfig
Configures the output of BatchPredictionJob
. See Model.supported_output_storage_formats
for supported output formats, and how predictions are expressed via any of them.
JSON representation |
---|
{ "predictionsFormat": string, // Union field |
Fields | |
---|---|
predictionsFormat |
Required. The format in which Vertex AI gives the predictions, must be one of the |
Union field destination . Required. The destination of the output. destination can be only one of the following: |
|
gcsDestination |
The Cloud Storage location of the directory where the output is to be written to. In the given directory a new directory is created. Its name is |
bigqueryDestination |
The BigQuery project or dataset location where the output is to be written to. If project is provided, a new dataset is created with name |
ManualBatchTuningParameters
Manual batch tuning parameters.
JSON representation |
---|
{ "batchSize": integer } |
Fields | |
---|---|
batchSize |
Immutable. The number of the records (e.g. instances) of the operation given in each batch to a machine replica. Machine type, and size of a single record should be considered when setting this parameter, higher value speeds up the batch operation's execution, but too high value will result in a whole batch not fitting in a machine's memory, and the whole operation will fail. The default value is 64. |
OutputInfo
Further describes this job's output. Supplements outputConfig
.
JSON representation |
---|
{ "bigqueryOutputTable": string, // Union field |
Fields | |
---|---|
bigqueryOutputTable |
Output only. The name of the BigQuery table created, in |
Union field output_location . The output location into which prediction output is written. output_location can be only one of the following: |
|
gcsOutputDirectory |
Output only. The full path of the Cloud Storage directory created, into which the prediction output is written. |
bigqueryOutputDataset |
Output only. The path of the BigQuery dataset created, in |
ResourcesConsumed
Statistics information about resource consumption.
JSON representation |
---|
{ "replicaHours": number } |
Fields | |
---|---|
replicaHours |
Output only. The number of replica hours used. Note that many replicas may run in parallel, and additionally any given work may be queued for some time. Therefore this value is not strictly related to wall time. |
CompletionStats
Success and error statistics of processing multiple entities (for example, DataItems or structured data rows) in batch.
JSON representation |
---|
{ "successfulCount": string, "failedCount": string, "incompleteCount": string, "successfulForecastPointCount": string } |
Fields | |
---|---|
successfulCount |
Output only. The number of entities that had been processed successfully. |
failedCount |
Output only. The number of entities for which any error was encountered. |
incompleteCount |
Output only. In cases when enough errors are encountered a job, pipeline, or operation may be failed as a whole. Below is the number of entities for which the processing had not been finished (either in successful or failed state). Set to -1 if the number is unknown (for example, the operation failed before the total entity number could be collected). |
successfulForecastPointCount |
Output only. The number of the successful forecast points that are generated by the forecasting model. This is ONLY used by the forecasting batch prediction. |
ModelMonitoringConfig
The model monitoring configuration used for Batch Prediction Job.
JSON representation |
---|
{ "objectiveConfigs": [ { object ( |
Fields | |
---|---|
objectiveConfigs[] |
Model monitoring objective config. |
alertConfig |
Model monitoring alert config. |
analysisInstanceSchemaUri |
YAML schema file uri in Cloud Storage describing the format of a single instance that you want Tensorflow Data Validation (TFDV) to analyze. If there are any data type differences between predict instance and TFDV instance, this field can be used to override the schema. For models trained with Vertex AI, this field must be set as all the fields in predict instance formatted as string. |
statsAnomaliesBaseDirectory |
A Google Cloud Storage location for batch prediction model monitoring to dump statistics and anomalies. If not provided, a folder will be created in customer project to hold statistics and anomalies. |
ModelMonitoringStatsAnomalies
Statistics and anomalies generated by Model Monitoring.
JSON representation |
---|
{ "objective": enum ( |
Fields | |
---|---|
objective |
Model Monitoring Objective those stats and anomalies belonging to. |
deployedModelId |
Deployed Model ID. |
anomalyCount |
Number of anomalies within all stats. |
featureStats[] |
A list of historical Stats and Anomalies generated for all Features. |
ModelDeploymentMonitoringObjectiveType
The Model Monitoring Objective types.
Enums | |
---|---|
MODEL_DEPLOYMENT_MONITORING_OBJECTIVE_TYPE_UNSPECIFIED |
Default value, should not be set. |
RAW_FEATURE_SKEW |
Raw feature values' stats to detect skew between Training-Prediction datasets. |
RAW_FEATURE_DRIFT |
Raw feature values' stats to detect drift between Serving-Prediction datasets. |
FEATURE_ATTRIBUTION_SKEW |
feature attribution scores to detect skew between Training-Prediction datasets. |
FEATURE_ATTRIBUTION_DRIFT |
feature attribution scores to detect skew between Prediction datasets collected within different time windows. |
FeatureHistoricStatsAnomalies
Historical Stats (and Anomalies) for a specific feature.
JSON representation |
---|
{ "featureDisplayName": string, "threshold": { object ( |
Fields | |
---|---|
featureDisplayName |
Display name of the feature. |
threshold |
Threshold for anomaly detection. |
trainingStats |
Stats calculated for the Training Dataset. |
predictionStats[] |
A list of historical stats generated by different time window's Prediction Dataset. |
Methods |
|
---|---|
|
Cancels a BatchPredictionJob. |
|
Creates a BatchPredictionJob. |
|
Deletes a BatchPredictionJob. |
|
Gets a BatchPredictionJob |
|
Lists BatchPredictionJobs in a Location. |