#[non_exhaustive]pub struct BatchPredictionJob {Show 29 fields
pub name: String,
pub display_name: String,
pub model: String,
pub model_version_id: String,
pub unmanaged_container_model: Option<UnmanagedContainerModel>,
pub input_config: Option<InputConfig>,
pub instance_config: Option<InstanceConfig>,
pub model_parameters: Option<Value>,
pub output_config: Option<OutputConfig>,
pub dedicated_resources: Option<BatchDedicatedResources>,
pub service_account: String,
pub manual_batch_tuning_parameters: Option<ManualBatchTuningParameters>,
pub generate_explanation: bool,
pub explanation_spec: Option<ExplanationSpec>,
pub output_info: Option<OutputInfo>,
pub state: JobState,
pub error: Option<Status>,
pub partial_failures: Vec<Status>,
pub resources_consumed: Option<ResourcesConsumed>,
pub completion_stats: Option<CompletionStats>,
pub create_time: Option<Timestamp>,
pub start_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub labels: HashMap<String, String>,
pub encryption_spec: Option<EncryptionSpec>,
pub disable_container_logging: bool,
pub satisfies_pzs: bool,
pub satisfies_pzi: bool,
/* private fields */
}Expand description
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.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringOutput only. Resource name of the BatchPredictionJob.
display_name: StringRequired. The user-defined name of this BatchPredictionJob.
model: StringThe 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 unmanaged_container_model must be set.
The model resource name may contain version id or version alias to specify
the version.
Example: projects/{project}/locations/{location}/models/{model}@2
or
projects/{project}/locations/{location}/models/{model}@golden
if no version is specified, the default version will be deployed.
The model resource could also be a publisher model.
Example: publishers/{publisher}/models/{model}
or
projects/{project}/locations/{location}/publishers/{publisher}/models/{model}
model_version_id: StringOutput only. The version ID of the Model that produces the predictions via this job.
unmanaged_container_model: Option<UnmanagedContainerModel>Contains model information necessary to perform batch prediction without requiring uploading to model registry. Exactly one of model and unmanaged_container_model must be set.
input_config: Option<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.
instance_config: Option<InstanceConfig>Configuration for how to convert batch prediction input instances to the prediction instances that are sent to the Model.
model_parameters: Option<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: Option<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: Option<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.
service_account: StringThe 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 iam.serviceAccounts.actAs
permission on this service account.
manual_batch_tuning_parameters: Option<ManualBatchTuningParameters>Immutable. Parameters configuring the batch behavior. Currently only applicable when dedicated_resources are used (in other cases Vertex AI does the tuning itself).
generate_explanation: boolGenerate explanation with the batch prediction results.
When set to true, the batch prediction output changes based on the
predictions_format field of the
BatchPredictionJob.output_config
object:
bigquery: output includes a column namedexplanation. The value is a struct that conforms to the Explanation object.jsonl: The JSON objects on each line include an additional entry keyedexplanation. The value of the entry is a JSON object that conforms to the Explanation object.csv: Generating explanations for CSV format is not supported.
If this field is set to true, either the Model.explanation_spec or explanation_spec must be populated.
explanation_spec: Option<ExplanationSpec>Explanation configuration for this BatchPredictionJob. Can be
specified only if
generate_explanation
is set to true.
This value overrides the value of Model.explanation_spec. All fields of explanation_spec are optional in the request. If a field of the explanation_spec object is not populated, the corresponding field of the Model.explanation_spec object is inherited.
output_info: Option<OutputInfo>Output only. Information further describing the output of this job.
state: JobStateOutput only. The detailed state of the job.
error: Option<Status>Output only. Only populated when the job’s state is JOB_STATE_FAILED or JOB_STATE_CANCELLED.
partial_failures: Vec<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 Google Cloud error details.
resources_consumed: Option<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: Option<CompletionStats>Output only. Statistics on completed and failed prediction instances.
create_time: Option<Timestamp>Output only. Time when the BatchPredictionJob was created.
start_time: Option<Timestamp>Output only. Time when the BatchPredictionJob for the first time entered
the JOB_STATE_RUNNING state.
end_time: Option<Timestamp>Output only. Time when the BatchPredictionJob entered any of the following
states: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED.
update_time: Option<Timestamp>Output only. Time when the BatchPredictionJob was most recently updated.
labels: HashMap<String, String>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.
encryption_spec: Option<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.
disable_container_logging: boolFor custom-trained Models and AutoML Tabular Models, the container of the
DeployedModel instances will send stderr and stdout streams to
Cloud Logging by default. Please note that the logs incur cost,
which are subject to Cloud Logging
pricing.
User can disable container logging by setting this flag to true.
satisfies_pzs: boolOutput only. Reserved for future use.
satisfies_pzi: boolOutput only. Reserved for future use.
Implementations§
Source§impl BatchPredictionJob
impl BatchPredictionJob
pub fn new() -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sets the value of display_name.
Sourcepub fn set_model_version_id<T: Into<String>>(self, v: T) -> Self
pub fn set_model_version_id<T: Into<String>>(self, v: T) -> Self
Sets the value of model_version_id.
Sourcepub fn set_unmanaged_container_model<T: Into<Option<UnmanagedContainerModel>>>(
self,
v: T,
) -> Self
pub fn set_unmanaged_container_model<T: Into<Option<UnmanagedContainerModel>>>( self, v: T, ) -> Self
Sets the value of unmanaged_container_model.
Sourcepub fn set_input_config<T: Into<Option<InputConfig>>>(self, v: T) -> Self
pub fn set_input_config<T: Into<Option<InputConfig>>>(self, v: T) -> Self
Sets the value of input_config.
Sourcepub fn set_instance_config<T: Into<Option<InstanceConfig>>>(self, v: T) -> Self
pub fn set_instance_config<T: Into<Option<InstanceConfig>>>(self, v: T) -> Self
Sets the value of instance_config.
Sourcepub fn set_model_parameters<T: Into<Option<Value>>>(self, v: T) -> Self
pub fn set_model_parameters<T: Into<Option<Value>>>(self, v: T) -> Self
Sets the value of model_parameters.
Sourcepub fn set_output_config<T: Into<Option<OutputConfig>>>(self, v: T) -> Self
pub fn set_output_config<T: Into<Option<OutputConfig>>>(self, v: T) -> Self
Sets the value of output_config.
Sourcepub fn set_dedicated_resources<T: Into<Option<BatchDedicatedResources>>>(
self,
v: T,
) -> Self
pub fn set_dedicated_resources<T: Into<Option<BatchDedicatedResources>>>( self, v: T, ) -> Self
Sets the value of dedicated_resources.
Sourcepub fn set_service_account<T: Into<String>>(self, v: T) -> Self
pub fn set_service_account<T: Into<String>>(self, v: T) -> Self
Sets the value of service_account.
Sourcepub fn set_manual_batch_tuning_parameters<T: Into<Option<ManualBatchTuningParameters>>>(
self,
v: T,
) -> Self
pub fn set_manual_batch_tuning_parameters<T: Into<Option<ManualBatchTuningParameters>>>( self, v: T, ) -> Self
Sets the value of manual_batch_tuning_parameters.
Sourcepub fn set_generate_explanation<T: Into<bool>>(self, v: T) -> Self
pub fn set_generate_explanation<T: Into<bool>>(self, v: T) -> Self
Sets the value of generate_explanation.
Sourcepub fn set_explanation_spec<T: Into<Option<ExplanationSpec>>>(
self,
v: T,
) -> Self
pub fn set_explanation_spec<T: Into<Option<ExplanationSpec>>>( self, v: T, ) -> Self
Sets the value of explanation_spec.
Sourcepub fn set_output_info<T: Into<Option<OutputInfo>>>(self, v: T) -> Self
pub fn set_output_info<T: Into<Option<OutputInfo>>>(self, v: T) -> Self
Sets the value of output_info.
Sourcepub fn set_partial_failures<T, V>(self, v: T) -> Self
pub fn set_partial_failures<T, V>(self, v: T) -> Self
Sets the value of partial_failures.
Sourcepub fn set_resources_consumed<T: Into<Option<ResourcesConsumed>>>(
self,
v: T,
) -> Self
pub fn set_resources_consumed<T: Into<Option<ResourcesConsumed>>>( self, v: T, ) -> Self
Sets the value of resources_consumed.
Sourcepub fn set_completion_stats<T: Into<Option<CompletionStats>>>(
self,
v: T,
) -> Self
pub fn set_completion_stats<T: Into<Option<CompletionStats>>>( self, v: T, ) -> Self
Sets the value of completion_stats.
Sourcepub fn set_create_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self
pub fn set_create_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self
Sets the value of create_time.
Sourcepub fn set_start_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self
pub fn set_start_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self
Sets the value of start_time.
Sourcepub fn set_end_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self
pub fn set_end_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self
Sets the value of end_time.
Sourcepub fn set_update_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self
pub fn set_update_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self
Sets the value of update_time.
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sets the value of labels.
Sourcepub fn set_encryption_spec<T: Into<Option<EncryptionSpec>>>(self, v: T) -> Self
pub fn set_encryption_spec<T: Into<Option<EncryptionSpec>>>(self, v: T) -> Self
Sets the value of encryption_spec.
Sourcepub fn set_disable_container_logging<T: Into<bool>>(self, v: T) -> Self
pub fn set_disable_container_logging<T: Into<bool>>(self, v: T) -> Self
Sets the value of disable_container_logging.
Sourcepub fn set_satisfies_pzs<T: Into<bool>>(self, v: T) -> Self
pub fn set_satisfies_pzs<T: Into<bool>>(self, v: T) -> Self
Sets the value of satisfies_pzs.
Sourcepub fn set_satisfies_pzi<T: Into<bool>>(self, v: T) -> Self
pub fn set_satisfies_pzi<T: Into<bool>>(self, v: T) -> Self
Sets the value of satisfies_pzi.
Trait Implementations§
Source§impl Clone for BatchPredictionJob
impl Clone for BatchPredictionJob
Source§fn clone(&self) -> BatchPredictionJob
fn clone(&self) -> BatchPredictionJob
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more