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

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/ml_v1/classes.rb,
lib/google/apis/ml_v1/representations.rb,
lib/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.



1730
1731
1732
# File 'lib/google/apis/ml_v1/classes.rb', line 1730

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

Instance Attribute Details

#nameString

metric name. Corresponds to the JSON property name

Returns:

  • (String)


1722
1723
1724
# File 'lib/google/apis/ml_v1/classes.rb', line 1722

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)


1728
1729
1730
# File 'lib/google/apis/ml_v1/classes.rb', line 1728

def target
  @target
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1735
1736
1737
1738
# File 'lib/google/apis/ml_v1/classes.rb', line 1735

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