Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1AutoscalingMetricSpec

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

Overview

The metric specification that defines the target resource utilization (CPU utilization, accelerator's duty cycle, and so on) for calculating the desired replica count.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1AutoscalingMetricSpec

Returns a new instance of GoogleCloudAiplatformV1beta1AutoscalingMetricSpec.



2469
2470
2471
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2469

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

Instance Attribute Details

#metric_nameString

Required. The resource metric name. Supported metrics: * For Online Prediction:

  • aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle * aiplatform.googleapis.com/prediction/online/cpu/utilization * aiplatform. googleapis.com/prediction/online/request_count * pubsub.googleapis.com/ subscription/num_undelivered_messages * prometheus.googleapis.com/ vertex_dcgm_fi_dev_gpu_util * prometheus.googleapis.com/ vertex_vllm_gpu_cache_usage_perc * prometheus.googleapis.com/ vertex_vllm_num_requests_waiting Corresponds to the JSON property metricName

Returns:

  • (String)


2452
2453
2454
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2452

def metric_name
  @metric_name
end

#monitored_resource_labelsHash<String,String>

Optional. The Cloud Monitoring monitored resource labels as key value pairs used for metrics filtering. See Cloud Monitoring Labels https://cloud.google. com/monitoring/api/v3/metric-model#generic-label-info Corresponds to the JSON property monitoredResourceLabels

Returns:

  • (Hash<String,String>)


2459
2460
2461
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2459

def monitored_resource_labels
  @monitored_resource_labels
end

#targetFixnum

The target resource utilization in percentage (1% - 100%) for the given metric; once the real usage deviates from the target by a certain percentage, the machine replicas change. The default value is 60 (representing 60%) if not provided. Corresponds to the JSON property target

Returns:

  • (Fixnum)


2467
2468
2469
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2467

def target
  @target
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2474
2475
2476
2477
2478
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2474

def update!(**args)
  @metric_name = args[:metric_name] if args.key?(:metric_name)
  @monitored_resource_labels = args[:monitored_resource_labels] if args.key?(:monitored_resource_labels)
  @target = args[:target] if args.key?(:target)
end