Class: Google::Apis::MlV1::GoogleCloudMlV1MetricSpec
- Inherits:
-
Object
- Object
- Google::Apis::MlV1::GoogleCloudMlV1MetricSpec
- 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
-
#name ⇒ String
metric name.
-
#target ⇒ Fixnum
Target specifies the target value for the given metric; once real metric deviates from the threshold by a certain percentage, the node count changes.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudMlV1MetricSpec
constructor
A new instance of GoogleCloudMlV1MetricSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
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
#name ⇒ String
metric name.
Corresponds to the JSON property name
1722 1723 1724 |
# File 'lib/google/apis/ml_v1/classes.rb', line 1722 def name @name end |
#target ⇒ Fixnum
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
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 |