Class BatchPredictionJob (0.4.0)

BatchPredictionJob(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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.


name str
Output only. Resource name of the BatchPredictionJob.
display_name str
Required. The user-defined name of this BatchPredictionJob.
model str
Required. The name of the Model 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.
input_config `.batch_prediction_job.BatchPredictionJob.InputConfig`
Required. Input configuration of the instances on which predictions are performed. The schema of any single instance may be specified via the [Model's][] [PredictSchemata's][] ``instance_schema_uri``.
model_parameters `.struct.Value`
The parameters that govern the predictions. The schema of the parameters may be specified via the [Model's][] [PredictSchemata's][] ``parameters_schema_uri``.
output_config `.batch_prediction_job.BatchPredictionJob.OutputConfig`
Required. The Configuration specifying where output predictions should be written. The schema of any single prediction may be specified as a concatenation of [Model's][] [PredictSchemata's][] ``instance_schema_uri`` and ``prediction_schema_uri``.
dedicated_resources `.machine_resources.BatchDedicatedResources`
The config of resources used by the Model during the batch prediction. If the Model ``supports`` DEDICATED_RESOURCES this config may be provided (and the job will use these resources), if the Model doesn't support AUTOMATIC_RESOURCES, this config must be provided.
manual_batch_tuning_parameters `.gca_manual_batch_tuning_parameters.ManualBatchTuningParameters`
Immutable. Parameters configuring the batch behavior. Currently only applicable when ``dedicated_resources`` are used (in other cases AI Platform does the tuning itself).
generate_explanation bool
Generate explanation along with the batch prediction results. When it's true, the batch prediction output will change based on the [output format][BatchPredictionJob.output_config.predictions_format]: - ``bigquery``: output will include a column named ``explanation``. The value is a struct that conforms to the ``Explanation`` object. - ``jsonl``: The JSON objects on each line will include an additional entry keyed ``explanation``. The value of the entry is a JSON object that conforms to the ``Explanation`` object. - ``csv``: Generating explanations for CSV format is not supported.
explanation_spec `.explanation.ExplanationSpec`
Explanation configuration for this BatchPredictionJob. Can only be specified if ``generate_explanation`` is set to ``true``. It's invalid to specified it with generate_explanation set to false or unset. This value overrides the value of ``Model.explanation_spec``. All fields of ``explanation_spec`` are optional in the request. If a field of ``explanation_spec`` is not populated, the value of the same field of ``Model.explanation_spec`` is inherited. The corresponding ``Model.explanation_spec`` must be populated, otherwise explanation for this Model is not allowed.
output_info `.batch_prediction_job.BatchPredictionJob.OutputInfo`
Output only. Information further describing the output of this job.
state `.job_state.JobState`
Output only. The detailed state of the job.
error `.status.Status`
Output only. Only populated when the job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED.
partial_failures Sequence[`.status.Status`]
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 GCP error details.
resources_consumed `.machine_resources.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.
completion_stats `.gca_completion_stats.CompletionStats`
Output only. Statistics on completed and failed prediction instances.
create_time `.timestamp.Timestamp`
Output only. Time when the BatchPredictionJob was created.
start_time `.timestamp.Timestamp`
Output only. Time when the BatchPredictionJob for the first time entered the ``JOB_STATE_RUNNING`` state.
end_time `.timestamp.Timestamp`
Output only. Time when the BatchPredictionJob entered any of the following states: ``JOB_STATE_SUCCEEDED``, ``JOB_STATE_FAILED``, ``JOB_STATE_CANCELLED``.
update_time `.timestamp.Timestamp`
Output only. Time when the BatchPredictionJob was most recently updated.
labels Sequence[`.batch_prediction_job.BatchPredictionJob.LabelsEntry`]
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 for more information and examples of labels.


builtins.object > proto.message.Message > BatchPredictionJob



InputConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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.


LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The abstract base class for a message.

kwargs dict

Keys and values corresponding to the fields of the message.

mapping Union[dict, `.Message`]

A dictionary or message to be used to determine the values for this message.

ignore_unknown_fields Optional(bool)

If True, do not raise errors for unknown fields. Only applied if mapping is a mapping type or there are keyword parameters.


OutputConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Configures the output of BatchPredictionJob. See Model.supported_output_storage_formats for supported output formats, and how predictions are expressed via any of them.


OutputInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Further describes this job's output. Supplements output_config.