Class: AWSCDK::Sagemaker::CfnModelCard::ObjectiveFunctionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
sagemaker/cfn_model_card.rb

Overview

The function that is optimized during model training.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(function: nil, notes: nil) ⇒ ObjectiveFunctionProperty

Returns a new instance of ObjectiveFunctionProperty.

Parameters:

  • function (AWSCDK::IResolvable, AWSCDK::Sagemaker::CfnModelCard::FunctionProperty, nil) (defaults to: nil)

    A function object that details optimization direction, metric, and additional descriptions.

  • notes (String, nil) (defaults to: nil)

    Notes about the object function, including other considerations for possible objective functions.



1685
1686
1687
1688
1689
1690
# File 'sagemaker/cfn_model_card.rb', line 1685

def initialize(function: nil, notes: nil)
  @function = function.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnModelCard::FunctionProperty.new(**function.transform_keys(&:to_sym)) : function
  Jsii::Type.check_type(@function, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuTW9kZWxDYXJkLkZ1bmN0aW9uUHJvcGVydHkifV19fQ==")), "function") unless @function.nil?
  @notes = notes
  Jsii::Type.check_type(@notes, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "notes") unless @notes.nil?
end

Instance Attribute Details

#functionAWSCDK::IResolvable, ... (readonly)

A function object that details optimization direction, metric, and additional descriptions.



1696
1697
1698
# File 'sagemaker/cfn_model_card.rb', line 1696

def function
  @function
end

#notesString? (readonly)

Notes about the object function, including other considerations for possible objective functions.



1701
1702
1703
# File 'sagemaker/cfn_model_card.rb', line 1701

def notes
  @notes
end

Class Method Details

.jsii_propertiesObject



1703
1704
1705
1706
1707
1708
# File 'sagemaker/cfn_model_card.rb', line 1703

def self.jsii_properties
  {
    :function => "function",
    :notes => "notes",
  }
end

Instance Method Details

#to_jsiiObject



1710
1711
1712
1713
1714
1715
1716
1717
# File 'sagemaker/cfn_model_card.rb', line 1710

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