Class: Google::Apis::MlV1::GoogleCloudMlV1MetricSpec

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

Overview

MetricSpec contains the specifications to use to calculate the desired nodes count when autoscaling is enabled.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudMlV1MetricSpec

Returns a new instance of GoogleCloudMlV1MetricSpec.



1712
1713
1714
# File 'generated/google/apis/ml_v1/classes.rb', line 1712

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

Instance Attribute Details

#nameString

metric name. Corresponds to the JSON property name

Returns:

  • (String)


1704
1705
1706
# File 'generated/google/apis/ml_v1/classes.rb', line 1704

def name
  @name
end

#targetFixnum

Target specifies the target value for the given metric; once real metric deviates from the threshold by a certain percentage, the node count changes. Corresponds to the JSON property target

Returns:

  • (Fixnum)


1710
1711
1712
# File 'generated/google/apis/ml_v1/classes.rb', line 1710

def target
  @target
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1717
1718
1719
1720
# File 'generated/google/apis/ml_v1/classes.rb', line 1717

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