/
batchPredictionJob.go
407 lines (354 loc) · 34.4 KB
/
batchPredictionJob.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package v1
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start.
// Auto-naming is currently not supported for this resource.
type BatchPredictionJob struct {
pulumi.CustomResourceState
// Statistics on completed and failed prediction instances.
CompletionStats GoogleCloudAiplatformV1CompletionStatsResponseOutput `pulumi:"completionStats"`
// Time when the BatchPredictionJob was created.
CreateTime pulumi.StringOutput `pulumi:"createTime"`
// 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.
DedicatedResources GoogleCloudAiplatformV1BatchDedicatedResourcesResponseOutput `pulumi:"dedicatedResources"`
// For 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](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true.
DisableContainerLogging pulumi.BoolOutput `pulumi:"disableContainerLogging"`
// The user-defined name of this BatchPredictionJob.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// 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.
EncryptionSpec GoogleCloudAiplatformV1EncryptionSpecResponseOutput `pulumi:"encryptionSpec"`
// Time when the BatchPredictionJob entered any of the following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
EndTime pulumi.StringOutput `pulumi:"endTime"`
// Only populated when the job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED.
Error GoogleRpcStatusResponseOutput `pulumi:"error"`
// 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.
ExplanationSpec GoogleCloudAiplatformV1ExplanationSpecResponseOutput `pulumi:"explanationSpec"`
// Generate 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 named `explanation`. The value is a struct that conforms to the Explanation object. * `jsonl`: The JSON objects on each line 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. If this field is set to true, either the Model.explanation_spec or explanation_spec must be populated.
GenerateExplanation pulumi.BoolOutput `pulumi:"generateExplanation"`
// 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.
InputConfig GoogleCloudAiplatformV1BatchPredictionJobInputConfigResponseOutput `pulumi:"inputConfig"`
// Configuration for how to convert batch prediction input instances to the prediction instances that are sent to the Model.
InstanceConfig GoogleCloudAiplatformV1BatchPredictionJobInstanceConfigResponseOutput `pulumi:"instanceConfig"`
// 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.
Labels pulumi.StringMapOutput `pulumi:"labels"`
Location pulumi.StringOutput `pulumi:"location"`
// Immutable. Parameters configuring the batch behavior. Currently only applicable when dedicated_resources are used (in other cases Vertex AI does the tuning itself).
ManualBatchTuningParameters GoogleCloudAiplatformV1ManualBatchTuningParametersResponseOutput `pulumi:"manualBatchTuningParameters"`
// 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 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 pulumi.StringOutput `pulumi:"model"`
// The parameters that govern the predictions. The schema of the parameters may be specified via the Model's PredictSchemata's parameters_schema_uri.
ModelParameters pulumi.AnyOutput `pulumi:"modelParameters"`
// The version ID of the Model that produces the predictions via this job.
ModelVersionId pulumi.StringOutput `pulumi:"modelVersionId"`
// Resource name of the BatchPredictionJob.
Name pulumi.StringOutput `pulumi:"name"`
// 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.
OutputConfig GoogleCloudAiplatformV1BatchPredictionJobOutputConfigResponseOutput `pulumi:"outputConfig"`
// Information further describing the output of this job.
OutputInfo GoogleCloudAiplatformV1BatchPredictionJobOutputInfoResponseOutput `pulumi:"outputInfo"`
// 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.
PartialFailures GoogleRpcStatusResponseArrayOutput `pulumi:"partialFailures"`
Project pulumi.StringOutput `pulumi:"project"`
// 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.
ResourcesConsumed GoogleCloudAiplatformV1ResourcesConsumedResponseOutput `pulumi:"resourcesConsumed"`
// 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 `iam.serviceAccounts.actAs` permission on this service account.
ServiceAccount pulumi.StringOutput `pulumi:"serviceAccount"`
// Time when the BatchPredictionJob for the first time entered the `JOB_STATE_RUNNING` state.
StartTime pulumi.StringOutput `pulumi:"startTime"`
// The detailed state of the job.
State pulumi.StringOutput `pulumi:"state"`
// 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.
UnmanagedContainerModel GoogleCloudAiplatformV1UnmanagedContainerModelResponseOutput `pulumi:"unmanagedContainerModel"`
// Time when the BatchPredictionJob was most recently updated.
UpdateTime pulumi.StringOutput `pulumi:"updateTime"`
}
// NewBatchPredictionJob registers a new resource with the given unique name, arguments, and options.
func NewBatchPredictionJob(ctx *pulumi.Context,
name string, args *BatchPredictionJobArgs, opts ...pulumi.ResourceOption) (*BatchPredictionJob, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.InputConfig == nil {
return nil, errors.New("invalid value for required argument 'InputConfig'")
}
if args.OutputConfig == nil {
return nil, errors.New("invalid value for required argument 'OutputConfig'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"location",
"project",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource BatchPredictionJob
err := ctx.RegisterResource("google-native:aiplatform/v1:BatchPredictionJob", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBatchPredictionJob gets an existing BatchPredictionJob resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetBatchPredictionJob(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BatchPredictionJobState, opts ...pulumi.ResourceOption) (*BatchPredictionJob, error) {
var resource BatchPredictionJob
err := ctx.ReadResource("google-native:aiplatform/v1:BatchPredictionJob", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BatchPredictionJob resources.
type batchPredictionJobState struct {
}
type BatchPredictionJobState struct {
}
func (BatchPredictionJobState) ElementType() reflect.Type {
return reflect.TypeOf((*batchPredictionJobState)(nil)).Elem()
}
type batchPredictionJobArgs struct {
// 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.
DedicatedResources *GoogleCloudAiplatformV1BatchDedicatedResources `pulumi:"dedicatedResources"`
// For 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](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true.
DisableContainerLogging *bool `pulumi:"disableContainerLogging"`
// The user-defined name of this BatchPredictionJob.
DisplayName string `pulumi:"displayName"`
// 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.
EncryptionSpec *GoogleCloudAiplatformV1EncryptionSpec `pulumi:"encryptionSpec"`
// 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.
ExplanationSpec *GoogleCloudAiplatformV1ExplanationSpec `pulumi:"explanationSpec"`
// Generate 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 named `explanation`. The value is a struct that conforms to the Explanation object. * `jsonl`: The JSON objects on each line 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. If this field is set to true, either the Model.explanation_spec or explanation_spec must be populated.
GenerateExplanation *bool `pulumi:"generateExplanation"`
// 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.
InputConfig GoogleCloudAiplatformV1BatchPredictionJobInputConfig `pulumi:"inputConfig"`
// Configuration for how to convert batch prediction input instances to the prediction instances that are sent to the Model.
InstanceConfig *GoogleCloudAiplatformV1BatchPredictionJobInstanceConfig `pulumi:"instanceConfig"`
// 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.
Labels map[string]string `pulumi:"labels"`
Location *string `pulumi:"location"`
// Immutable. Parameters configuring the batch behavior. Currently only applicable when dedicated_resources are used (in other cases Vertex AI does the tuning itself).
ManualBatchTuningParameters *GoogleCloudAiplatformV1ManualBatchTuningParameters `pulumi:"manualBatchTuningParameters"`
// 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 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 *string `pulumi:"model"`
// The parameters that govern the predictions. The schema of the parameters may be specified via the Model's PredictSchemata's parameters_schema_uri.
ModelParameters interface{} `pulumi:"modelParameters"`
// 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.
OutputConfig GoogleCloudAiplatformV1BatchPredictionJobOutputConfig `pulumi:"outputConfig"`
Project *string `pulumi:"project"`
// 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 `iam.serviceAccounts.actAs` permission on this service account.
ServiceAccount *string `pulumi:"serviceAccount"`
// 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.
UnmanagedContainerModel *GoogleCloudAiplatformV1UnmanagedContainerModel `pulumi:"unmanagedContainerModel"`
}
// The set of arguments for constructing a BatchPredictionJob resource.
type BatchPredictionJobArgs struct {
// 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.
DedicatedResources GoogleCloudAiplatformV1BatchDedicatedResourcesPtrInput
// For 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](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true.
DisableContainerLogging pulumi.BoolPtrInput
// The user-defined name of this BatchPredictionJob.
DisplayName pulumi.StringInput
// 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.
EncryptionSpec GoogleCloudAiplatformV1EncryptionSpecPtrInput
// 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.
ExplanationSpec GoogleCloudAiplatformV1ExplanationSpecPtrInput
// Generate 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 named `explanation`. The value is a struct that conforms to the Explanation object. * `jsonl`: The JSON objects on each line 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. If this field is set to true, either the Model.explanation_spec or explanation_spec must be populated.
GenerateExplanation pulumi.BoolPtrInput
// 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.
InputConfig GoogleCloudAiplatformV1BatchPredictionJobInputConfigInput
// Configuration for how to convert batch prediction input instances to the prediction instances that are sent to the Model.
InstanceConfig GoogleCloudAiplatformV1BatchPredictionJobInstanceConfigPtrInput
// 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.
Labels pulumi.StringMapInput
Location pulumi.StringPtrInput
// Immutable. Parameters configuring the batch behavior. Currently only applicable when dedicated_resources are used (in other cases Vertex AI does the tuning itself).
ManualBatchTuningParameters GoogleCloudAiplatformV1ManualBatchTuningParametersPtrInput
// 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 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 pulumi.StringPtrInput
// The parameters that govern the predictions. The schema of the parameters may be specified via the Model's PredictSchemata's parameters_schema_uri.
ModelParameters pulumi.Input
// 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.
OutputConfig GoogleCloudAiplatformV1BatchPredictionJobOutputConfigInput
Project pulumi.StringPtrInput
// 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 `iam.serviceAccounts.actAs` permission on this service account.
ServiceAccount pulumi.StringPtrInput
// 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.
UnmanagedContainerModel GoogleCloudAiplatformV1UnmanagedContainerModelPtrInput
}
func (BatchPredictionJobArgs) ElementType() reflect.Type {
return reflect.TypeOf((*batchPredictionJobArgs)(nil)).Elem()
}
type BatchPredictionJobInput interface {
pulumi.Input
ToBatchPredictionJobOutput() BatchPredictionJobOutput
ToBatchPredictionJobOutputWithContext(ctx context.Context) BatchPredictionJobOutput
}
func (*BatchPredictionJob) ElementType() reflect.Type {
return reflect.TypeOf((**BatchPredictionJob)(nil)).Elem()
}
func (i *BatchPredictionJob) ToBatchPredictionJobOutput() BatchPredictionJobOutput {
return i.ToBatchPredictionJobOutputWithContext(context.Background())
}
func (i *BatchPredictionJob) ToBatchPredictionJobOutputWithContext(ctx context.Context) BatchPredictionJobOutput {
return pulumi.ToOutputWithContext(ctx, i).(BatchPredictionJobOutput)
}
type BatchPredictionJobOutput struct{ *pulumi.OutputState }
func (BatchPredictionJobOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BatchPredictionJob)(nil)).Elem()
}
func (o BatchPredictionJobOutput) ToBatchPredictionJobOutput() BatchPredictionJobOutput {
return o
}
func (o BatchPredictionJobOutput) ToBatchPredictionJobOutputWithContext(ctx context.Context) BatchPredictionJobOutput {
return o
}
// Statistics on completed and failed prediction instances.
func (o BatchPredictionJobOutput) CompletionStats() GoogleCloudAiplatformV1CompletionStatsResponseOutput {
return o.ApplyT(func(v *BatchPredictionJob) GoogleCloudAiplatformV1CompletionStatsResponseOutput {
return v.CompletionStats
}).(GoogleCloudAiplatformV1CompletionStatsResponseOutput)
}
// Time when the BatchPredictionJob was created.
func (o BatchPredictionJobOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v *BatchPredictionJob) pulumi.StringOutput { return v.CreateTime }).(pulumi.StringOutput)
}
// 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.
func (o BatchPredictionJobOutput) DedicatedResources() GoogleCloudAiplatformV1BatchDedicatedResourcesResponseOutput {
return o.ApplyT(func(v *BatchPredictionJob) GoogleCloudAiplatformV1BatchDedicatedResourcesResponseOutput {
return v.DedicatedResources
}).(GoogleCloudAiplatformV1BatchDedicatedResourcesResponseOutput)
}
// For 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](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true.
func (o BatchPredictionJobOutput) DisableContainerLogging() pulumi.BoolOutput {
return o.ApplyT(func(v *BatchPredictionJob) pulumi.BoolOutput { return v.DisableContainerLogging }).(pulumi.BoolOutput)
}
// The user-defined name of this BatchPredictionJob.
func (o BatchPredictionJobOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *BatchPredictionJob) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// 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.
func (o BatchPredictionJobOutput) EncryptionSpec() GoogleCloudAiplatformV1EncryptionSpecResponseOutput {
return o.ApplyT(func(v *BatchPredictionJob) GoogleCloudAiplatformV1EncryptionSpecResponseOutput {
return v.EncryptionSpec
}).(GoogleCloudAiplatformV1EncryptionSpecResponseOutput)
}
// Time when the BatchPredictionJob entered any of the following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
func (o BatchPredictionJobOutput) EndTime() pulumi.StringOutput {
return o.ApplyT(func(v *BatchPredictionJob) pulumi.StringOutput { return v.EndTime }).(pulumi.StringOutput)
}
// Only populated when the job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED.
func (o BatchPredictionJobOutput) Error() GoogleRpcStatusResponseOutput {
return o.ApplyT(func(v *BatchPredictionJob) GoogleRpcStatusResponseOutput { return v.Error }).(GoogleRpcStatusResponseOutput)
}
// 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.
func (o BatchPredictionJobOutput) ExplanationSpec() GoogleCloudAiplatformV1ExplanationSpecResponseOutput {
return o.ApplyT(func(v *BatchPredictionJob) GoogleCloudAiplatformV1ExplanationSpecResponseOutput {
return v.ExplanationSpec
}).(GoogleCloudAiplatformV1ExplanationSpecResponseOutput)
}
// Generate 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 named `explanation`. The value is a struct that conforms to the Explanation object. * `jsonl`: The JSON objects on each line 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. If this field is set to true, either the Model.explanation_spec or explanation_spec must be populated.
func (o BatchPredictionJobOutput) GenerateExplanation() pulumi.BoolOutput {
return o.ApplyT(func(v *BatchPredictionJob) pulumi.BoolOutput { return v.GenerateExplanation }).(pulumi.BoolOutput)
}
// 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.
func (o BatchPredictionJobOutput) InputConfig() GoogleCloudAiplatformV1BatchPredictionJobInputConfigResponseOutput {
return o.ApplyT(func(v *BatchPredictionJob) GoogleCloudAiplatformV1BatchPredictionJobInputConfigResponseOutput {
return v.InputConfig
}).(GoogleCloudAiplatformV1BatchPredictionJobInputConfigResponseOutput)
}
// Configuration for how to convert batch prediction input instances to the prediction instances that are sent to the Model.
func (o BatchPredictionJobOutput) InstanceConfig() GoogleCloudAiplatformV1BatchPredictionJobInstanceConfigResponseOutput {
return o.ApplyT(func(v *BatchPredictionJob) GoogleCloudAiplatformV1BatchPredictionJobInstanceConfigResponseOutput {
return v.InstanceConfig
}).(GoogleCloudAiplatformV1BatchPredictionJobInstanceConfigResponseOutput)
}
// 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.
func (o BatchPredictionJobOutput) Labels() pulumi.StringMapOutput {
return o.ApplyT(func(v *BatchPredictionJob) pulumi.StringMapOutput { return v.Labels }).(pulumi.StringMapOutput)
}
func (o BatchPredictionJobOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *BatchPredictionJob) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Immutable. Parameters configuring the batch behavior. Currently only applicable when dedicated_resources are used (in other cases Vertex AI does the tuning itself).
func (o BatchPredictionJobOutput) ManualBatchTuningParameters() GoogleCloudAiplatformV1ManualBatchTuningParametersResponseOutput {
return o.ApplyT(func(v *BatchPredictionJob) GoogleCloudAiplatformV1ManualBatchTuningParametersResponseOutput {
return v.ManualBatchTuningParameters
}).(GoogleCloudAiplatformV1ManualBatchTuningParametersResponseOutput)
}
// 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 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}`
func (o BatchPredictionJobOutput) Model() pulumi.StringOutput {
return o.ApplyT(func(v *BatchPredictionJob) pulumi.StringOutput { return v.Model }).(pulumi.StringOutput)
}
// The parameters that govern the predictions. The schema of the parameters may be specified via the Model's PredictSchemata's parameters_schema_uri.
func (o BatchPredictionJobOutput) ModelParameters() pulumi.AnyOutput {
return o.ApplyT(func(v *BatchPredictionJob) pulumi.AnyOutput { return v.ModelParameters }).(pulumi.AnyOutput)
}
// The version ID of the Model that produces the predictions via this job.
func (o BatchPredictionJobOutput) ModelVersionId() pulumi.StringOutput {
return o.ApplyT(func(v *BatchPredictionJob) pulumi.StringOutput { return v.ModelVersionId }).(pulumi.StringOutput)
}
// Resource name of the BatchPredictionJob.
func (o BatchPredictionJobOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *BatchPredictionJob) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// 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.
func (o BatchPredictionJobOutput) OutputConfig() GoogleCloudAiplatformV1BatchPredictionJobOutputConfigResponseOutput {
return o.ApplyT(func(v *BatchPredictionJob) GoogleCloudAiplatformV1BatchPredictionJobOutputConfigResponseOutput {
return v.OutputConfig
}).(GoogleCloudAiplatformV1BatchPredictionJobOutputConfigResponseOutput)
}
// Information further describing the output of this job.
func (o BatchPredictionJobOutput) OutputInfo() GoogleCloudAiplatformV1BatchPredictionJobOutputInfoResponseOutput {
return o.ApplyT(func(v *BatchPredictionJob) GoogleCloudAiplatformV1BatchPredictionJobOutputInfoResponseOutput {
return v.OutputInfo
}).(GoogleCloudAiplatformV1BatchPredictionJobOutputInfoResponseOutput)
}
// 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.
func (o BatchPredictionJobOutput) PartialFailures() GoogleRpcStatusResponseArrayOutput {
return o.ApplyT(func(v *BatchPredictionJob) GoogleRpcStatusResponseArrayOutput { return v.PartialFailures }).(GoogleRpcStatusResponseArrayOutput)
}
func (o BatchPredictionJobOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *BatchPredictionJob) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
// 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.
func (o BatchPredictionJobOutput) ResourcesConsumed() GoogleCloudAiplatformV1ResourcesConsumedResponseOutput {
return o.ApplyT(func(v *BatchPredictionJob) GoogleCloudAiplatformV1ResourcesConsumedResponseOutput {
return v.ResourcesConsumed
}).(GoogleCloudAiplatformV1ResourcesConsumedResponseOutput)
}
// 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 `iam.serviceAccounts.actAs` permission on this service account.
func (o BatchPredictionJobOutput) ServiceAccount() pulumi.StringOutput {
return o.ApplyT(func(v *BatchPredictionJob) pulumi.StringOutput { return v.ServiceAccount }).(pulumi.StringOutput)
}
// Time when the BatchPredictionJob for the first time entered the `JOB_STATE_RUNNING` state.
func (o BatchPredictionJobOutput) StartTime() pulumi.StringOutput {
return o.ApplyT(func(v *BatchPredictionJob) pulumi.StringOutput { return v.StartTime }).(pulumi.StringOutput)
}
// The detailed state of the job.
func (o BatchPredictionJobOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v *BatchPredictionJob) pulumi.StringOutput { return v.State }).(pulumi.StringOutput)
}
// 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.
func (o BatchPredictionJobOutput) UnmanagedContainerModel() GoogleCloudAiplatformV1UnmanagedContainerModelResponseOutput {
return o.ApplyT(func(v *BatchPredictionJob) GoogleCloudAiplatformV1UnmanagedContainerModelResponseOutput {
return v.UnmanagedContainerModel
}).(GoogleCloudAiplatformV1UnmanagedContainerModelResponseOutput)
}
// Time when the BatchPredictionJob was most recently updated.
func (o BatchPredictionJobOutput) UpdateTime() pulumi.StringOutput {
return o.ApplyT(func(v *BatchPredictionJob) pulumi.StringOutput { return v.UpdateTime }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BatchPredictionJobInput)(nil)).Elem(), &BatchPredictionJob{})
pulumi.RegisterOutputType(BatchPredictionJobOutput{})
}