Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1AutoscalingMetricSpec

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

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) ⇒ GoogleCloudAiplatformV1AutoscalingMetricSpec

Returns a new instance of GoogleCloudAiplatformV1AutoscalingMetricSpec.



1100
1101
1102
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 1100

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

Returns:

  • (String)


1090
1091
1092
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 1090

def metric_name
  @metric_name
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)


1098
1099
1100
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 1098

def target
  @target
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1105
1106
1107
1108
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 1105

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