Class: AWSCDK::Sagemaker::CfnModelCard::SourceAlgorithmProperty

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

Overview

Specifies an algorithm that was used to create the model package.

The algorithm must be either an algorithm resource in your SageMaker account or an algorithm in AWS Marketplace that you are subscribed to.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(algorithm_name:, model_data_url: nil) ⇒ SourceAlgorithmProperty

Returns a new instance of SourceAlgorithmProperty.

Parameters:

  • algorithm_name (String)

    The name of an algorithm that was used to create the model package.

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

    The Amazon S3 path where the model artifacts, which result from model training, are stored.



1763
1764
1765
1766
1767
1768
# File 'sagemaker/cfn_model_card.rb', line 1763

def initialize(algorithm_name:, model_data_url: nil)
  @algorithm_name = algorithm_name
  Jsii::Type.check_type(@algorithm_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "algorithmName")
  @model_data_url = model_data_url
  Jsii::Type.check_type(@model_data_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "modelDataUrl") unless @model_data_url.nil?
end

Instance Attribute Details

#algorithm_nameString (readonly)

The name of an algorithm that was used to create the model package.

The algorithm must be either an algorithm resource in your SageMaker account or an algorithm in AWS Marketplace that you are subscribed to.



1776
1777
1778
# File 'sagemaker/cfn_model_card.rb', line 1776

def algorithm_name
  @algorithm_name
end

#model_data_urlString? (readonly)

The Amazon S3 path where the model artifacts, which result from model training, are stored.

This path must point to a single gzip compressed tar archive ( .tar.gz suffix).

The model artifacts must be in an S3 bucket that is in the same AWS region as the algorithm.



1785
1786
1787
# File 'sagemaker/cfn_model_card.rb', line 1785

def model_data_url
  @model_data_url
end

Class Method Details

.jsii_propertiesObject



1787
1788
1789
1790
1791
1792
# File 'sagemaker/cfn_model_card.rb', line 1787

def self.jsii_properties
  {
    :algorithm_name => "algorithmName",
    :model_data_url => "modelDataUrl",
  }
end

Instance Method Details

#to_jsiiObject



1794
1795
1796
1797
1798
1799
1800
1801
# File 'sagemaker/cfn_model_card.rb', line 1794

def to_jsii
  result = {}
  result.merge!({
    "algorithmName" => @algorithm_name,
    "modelDataUrl" => @model_data_url,
  })
  result.compact
end