Class: AWSCDK::Sagemaker::CfnModelPackage::InferenceSpecificationProperty

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

Overview

Defines how to perform inference generation after a training job is run.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(containers:, supported_content_types:, supported_response_mime_types:, supported_realtime_inference_instance_types: nil, supported_transform_instance_types: nil) ⇒ InferenceSpecificationProperty

Returns a new instance of InferenceSpecificationProperty.

Parameters:

  • containers (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Sagemaker::CfnModelPackage::ModelPackageContainerDefinitionProperty>)

    The Amazon ECR registry path of the Docker image that contains the inference code.

  • supported_content_types (Array<String>)

    The supported MIME types for the input data.

  • supported_response_mime_types (Array<String>)

    The supported MIME types for the output data.

  • supported_realtime_inference_instance_types (Array<String>, nil) (defaults to: nil)

    A list of the instance types that are used to generate inferences in real-time.

  • supported_transform_instance_types (Array<String>, nil) (defaults to: nil)

    A list of the instance types on which a transformation job can be run or on which an endpoint can be deployed.



1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
# File 'sagemaker/cfn_model_package.rb', line 1423

def initialize(containers:, supported_content_types:, supported_response_mime_types:, supported_realtime_inference_instance_types: nil, supported_transform_instance_types: nil)
  @containers = containers
  Jsii::Type.check_type(@containers, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2FnZW1ha2VyLkNmbk1vZGVsUGFja2FnZS5Nb2RlbFBhY2thZ2VDb250YWluZXJEZWZpbml0aW9uUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "containers")
  @supported_content_types = supported_content_types
  Jsii::Type.check_type(@supported_content_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "supportedContentTypes")
  @supported_response_mime_types = supported_response_mime_types
  Jsii::Type.check_type(@supported_response_mime_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "supportedResponseMimeTypes")
  @supported_realtime_inference_instance_types = supported_realtime_inference_instance_types
  Jsii::Type.check_type(@supported_realtime_inference_instance_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "supportedRealtimeInferenceInstanceTypes") unless @supported_realtime_inference_instance_types.nil?
  @supported_transform_instance_types = supported_transform_instance_types
  Jsii::Type.check_type(@supported_transform_instance_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "supportedTransformInstanceTypes") unless @supported_transform_instance_types.nil?
end

Instance Attribute Details

#supported_content_typesArray<String> (readonly)

The supported MIME types for the input data.



1445
1446
1447
# File 'sagemaker/cfn_model_package.rb', line 1445

def supported_content_types
  @supported_content_types
end

#supported_realtime_inference_instance_typesArray<String>? (readonly)

A list of the instance types that are used to generate inferences in real-time.

This parameter is required for unversioned models, and optional for versioned models.



1457
1458
1459
# File 'sagemaker/cfn_model_package.rb', line 1457

def supported_realtime_inference_instance_types
  @supported_realtime_inference_instance_types
end

#supported_response_mime_typesArray<String> (readonly)

The supported MIME types for the output data.



1450
1451
1452
# File 'sagemaker/cfn_model_package.rb', line 1450

def supported_response_mime_types
  @supported_response_mime_types
end

#supported_transform_instance_typesArray<String>? (readonly)

A list of the instance types on which a transformation job can be run or on which an endpoint can be deployed.

This parameter is required for unversioned models, and optional for versioned models.



1464
1465
1466
# File 'sagemaker/cfn_model_package.rb', line 1464

def supported_transform_instance_types
  @supported_transform_instance_types
end

Class Method Details

.jsii_propertiesObject



1466
1467
1468
1469
1470
1471
1472
1473
1474
# File 'sagemaker/cfn_model_package.rb', line 1466

def self.jsii_properties
  {
    :containers => "containers",
    :supported_content_types => "supportedContentTypes",
    :supported_response_mime_types => "supportedResponseMimeTypes",
    :supported_realtime_inference_instance_types => "supportedRealtimeInferenceInstanceTypes",
    :supported_transform_instance_types => "supportedTransformInstanceTypes",
  }
end

Instance Method Details

#to_jsiiObject



1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
# File 'sagemaker/cfn_model_package.rb', line 1476

def to_jsii
  result = {}
  result.merge!({
    "containers" => @containers,
    "supportedContentTypes" => @supported_content_types,
    "supportedResponseMimeTypes" => @supported_response_mime_types,
    "supportedRealtimeInferenceInstanceTypes" => @supported_realtime_inference_instance_types,
    "supportedTransformInstanceTypes" => @supported_transform_instance_types,
  })
  result.compact
end