Class: AWSCDK::StepFunctionsTasks::MetricDefinition

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
step_functions_tasks/metric_definition.rb

Overview

Specifies the metric name and regular expressions used to parse algorithm logs.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, regex:) ⇒ MetricDefinition

Returns a new instance of MetricDefinition.

Parameters:

  • name (String)

    Name of the metric.

  • regex (String)

    Regular expression that searches the output of a training job and gets the value of the metric.



9
10
11
12
13
14
# File 'step_functions_tasks/metric_definition.rb', line 9

def initialize(name:, regex:)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @regex = regex
  Jsii::Type.check_type(@regex, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "regex")
end

Instance Attribute Details

#nameString (readonly)

Name of the metric.

Returns:

  • (String)


19
20
21
# File 'step_functions_tasks/metric_definition.rb', line 19

def name
  @name
end

#regexString (readonly)

Regular expression that searches the output of a training job and gets the value of the metric.

Returns:

  • (String)


23
24
25
# File 'step_functions_tasks/metric_definition.rb', line 23

def regex
  @regex
end

Class Method Details

.jsii_propertiesObject



25
26
27
28
29
30
# File 'step_functions_tasks/metric_definition.rb', line 25

def self.jsii_properties
  {
    :name => "name",
    :regex => "regex",
  }
end

Instance Method Details

#to_jsiiObject



32
33
34
35
36
37
38
39
# File 'step_functions_tasks/metric_definition.rb', line 32

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "regex" => @regex,
  })
  result.compact
end