Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1BatchPredictionJob

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/aiplatform_v1/classes.rb,
lib/google/apis/aiplatform_v1/representations.rb,
lib/google/apis/aiplatform_v1/representations.rb

Overview

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1BatchPredictionJob

Returns a new instance of GoogleCloudAiplatformV1BatchPredictionJob.



2528
2529
2530
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2528

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#completion_statsGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1CompletionStats

Success and error statistics of processing multiple entities (for example, DataItems or structured data rows) in batch. Corresponds to the JSON property completionStats



2346
2347
2348
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2346

def completion_stats
  @completion_stats
end

#create_timeString

Output only. Time when the BatchPredictionJob was created. Corresponds to the JSON property createTime

Returns:

  • (String)


2351
2352
2353
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2351

def create_time
  @create_time
end

#dedicated_resourcesGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1BatchDedicatedResources

A description of resources that are used for performing batch operations, are dedicated to a Model, and need manual configuration. Corresponds to the JSON property dedicatedResources



2357
2358
2359
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2357

def dedicated_resources
  @dedicated_resources
end

#disable_container_loggingBoolean Also known as: disable_container_logging?

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. User can disable container logging by setting this flag to true. Corresponds to the JSON property disableContainerLogging

Returns:

  • (Boolean)


2366
2367
2368
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2366

def disable_container_logging
  @disable_container_logging
end

#display_nameString

Required. The user-defined name of this BatchPredictionJob. Corresponds to the JSON property displayName

Returns:

  • (String)


2372
2373
2374
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2372

def display_name
  @display_name
end

#encryption_specGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1EncryptionSpec

Represents a customer-managed encryption key spec that can be applied to a top- level resource. Corresponds to the JSON property encryptionSpec



2378
2379
2380
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2378

def encryption_spec
  @encryption_spec
end

#end_timeString

Output only. Time when the BatchPredictionJob entered any of the following states: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED. Corresponds to the JSON property endTime

Returns:

  • (String)


2384
2385
2386
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2384

def end_time
  @end_time
end

#errorGoogle::Apis::AiplatformV1::GoogleRpcStatus

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide. Corresponds to the JSON property error



2394
2395
2396
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2394

def error
  @error
end

#explanation_specGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1ExplanationSpec

Specification of Model explanation. Corresponds to the JSON property explanationSpec



2399
2400
2401
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2399

def explanation_spec
  @explanation_spec
end

#generate_explanationBoolean Also known as: generate_explanation?

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. Corresponds to the JSON property generateExplanation

Returns:

  • (Boolean)


2412
2413
2414
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2412

def generate_explanation
  @generate_explanation
end

#input_configGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1BatchPredictionJobInputConfig

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. Corresponds to the JSON property inputConfig



2420
2421
2422
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2420

def input_config
  @input_config
end

#instance_configGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1BatchPredictionJobInstanceConfig

Configuration defining how to transform batch prediction input instances to the instances that the Model accepts. Corresponds to the JSON property instanceConfig



2426
2427
2428
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2426

def instance_config
  @instance_config
end

#labelsHash<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. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


2435
2436
2437
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2435

def labels
  @labels
end

#manual_batch_tuning_parametersGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1ManualBatchTuningParameters

Manual batch tuning parameters. Corresponds to the JSON property manualBatchTuningParameters



2440
2441
2442
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2440

def manual_batch_tuning_parameters
  @manual_batch_tuning_parameters
end

#modelString

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/modelor `projects/`project`/ locations/`location`/publishers/`publisher`/models/`model Corresponds to the JSON property model

Returns:

  • (String)


2454
2455
2456
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2454

def model
  @model
end

#model_parametersObject

The parameters that govern the predictions. The schema of the parameters may be specified via the Model's PredictSchemata's parameters_schema_uri. Corresponds to the JSON property modelParameters

Returns:

  • (Object)


2460
2461
2462
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2460

def model_parameters
  @model_parameters
end

#model_version_idString

Output only. The version ID of the Model that produces the predictions via this job. Corresponds to the JSON property modelVersionId

Returns:

  • (String)


2466
2467
2468
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2466

def model_version_id
  @model_version_id
end

#nameString

Output only. Resource name of the BatchPredictionJob. Corresponds to the JSON property name

Returns:

  • (String)


2471
2472
2473
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2471

def name
  @name
end

#output_configGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1BatchPredictionJobOutputConfig

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



2478
2479
2480
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2478

def output_config
  @output_config
end

#output_infoGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1BatchPredictionJobOutputInfo

Further describes this job's output. Supplements output_config. Corresponds to the JSON property outputInfo



2483
2484
2485
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2483

def output_info
  @output_info
end

#partial_failuresArray<Google::Apis::AiplatformV1::GoogleRpcStatus>

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. Corresponds to the JSON property partialFailures



2490
2491
2492
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2490

def partial_failures
  @partial_failures
end

#resources_consumedGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1ResourcesConsumed

Statistics information about resource consumption. Corresponds to the JSON property resourcesConsumed



2495
2496
2497
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2495

def resources_consumed
  @resources_consumed
end

#service_accountString

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. Corresponds to the JSON property serviceAccount

Returns:

  • (String)


2504
2505
2506
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2504

def 
  @service_account
end

#start_timeString

Output only. Time when the BatchPredictionJob for the first time entered the JOB_STATE_RUNNING state. Corresponds to the JSON property startTime

Returns:

  • (String)


2510
2511
2512
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2510

def start_time
  @start_time
end

#stateString

Output only. The detailed state of the job. Corresponds to the JSON property state

Returns:

  • (String)


2515
2516
2517
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2515

def state
  @state
end

#unmanaged_container_modelGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1UnmanagedContainerModel

Contains model information necessary to perform batch prediction without requiring a full model import. Corresponds to the JSON property unmanagedContainerModel



2521
2522
2523
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2521

def unmanaged_container_model
  @unmanaged_container_model
end

#update_timeString

Output only. Time when the BatchPredictionJob was most recently updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


2526
2527
2528
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2526

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2533

def update!(**args)
  @completion_stats = args[:completion_stats] if args.key?(:completion_stats)
  @create_time = args[:create_time] if args.key?(:create_time)
  @dedicated_resources = args[:dedicated_resources] if args.key?(:dedicated_resources)
  @disable_container_logging = args[:disable_container_logging] if args.key?(:disable_container_logging)
  @display_name = args[:display_name] if args.key?(:display_name)
  @encryption_spec = args[:encryption_spec] if args.key?(:encryption_spec)
  @end_time = args[:end_time] if args.key?(:end_time)
  @error = args[:error] if args.key?(:error)
  @explanation_spec = args[:explanation_spec] if args.key?(:explanation_spec)
  @generate_explanation = args[:generate_explanation] if args.key?(:generate_explanation)
  @input_config = args[:input_config] if args.key?(:input_config)
  @instance_config = args[:instance_config] if args.key?(:instance_config)
  @labels = args[:labels] if args.key?(:labels)
  @manual_batch_tuning_parameters = args[:manual_batch_tuning_parameters] if args.key?(:manual_batch_tuning_parameters)
  @model = args[:model] if args.key?(:model)
  @model_parameters = args[:model_parameters] if args.key?(:model_parameters)
  @model_version_id = args[:model_version_id] if args.key?(:model_version_id)
  @name = args[:name] if args.key?(:name)
  @output_config = args[:output_config] if args.key?(:output_config)
  @output_info = args[:output_info] if args.key?(:output_info)
  @partial_failures = args[:partial_failures] if args.key?(:partial_failures)
  @resources_consumed = args[:resources_consumed] if args.key?(:resources_consumed)
  @service_account = args[:service_account] if args.key?(:service_account)
  @start_time = args[:start_time] if args.key?(:start_time)
  @state = args[:state] if args.key?(:state)
  @unmanaged_container_model = args[:unmanaged_container_model] if args.key?(:unmanaged_container_model)
  @update_time = args[:update_time] if args.key?(:update_time)
end