CfnModelPackageProps
- class aws_cdk.aws_sagemaker.CfnModelPackageProps(*, additional_inference_specifications=None, additional_inference_specifications_to_add=None, approval_description=None, certify_for_marketplace=None, client_token=None, customer_metadata_properties=None, domain=None, drift_check_baselines=None, inference_specification=None, last_modified_time=None, metadata_properties=None, model_approval_status=None, model_card=None, model_metrics=None, model_package_description=None, model_package_group_name=None, model_package_name=None, model_package_status_details=None, model_package_version=None, sample_payload_url=None, security_config=None, skip_model_validation=None, source_algorithm_specification=None, source_uri=None, tags=None, task=None, validation_specification=None)
Bases:
object
Properties for defining a
CfnModelPackage
.- Parameters:
additional_inference_specifications (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,AdditionalInferenceSpecificationDefinitionProperty
,Dict
[str
,Any
]]],None
]) – An array of additional Inference Specification objects.additional_inference_specifications_to_add (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,AdditionalInferenceSpecificationDefinitionProperty
,Dict
[str
,Any
]]],None
]) – An array of additional Inference Specification objects to be added to the existing array. The total number of additional Inference Specification objects cannot exceed 15. Each additional Inference Specification object specifies artifacts based on this model package that can be used on inference endpoints. Generally used with SageMaker Neo to store the compiled artifacts.approval_description (
Optional
[str
]) – A description provided when the model approval is set.certify_for_marketplace (
Union
[bool
,IResolvable
,None
]) – Whether the model package is to be certified to be listed on AWS Marketplace. For information about listing model packages on AWS Marketplace, see List Your Algorithm or Model Package on AWS Marketplace .client_token (
Optional
[str
]) – A unique token that guarantees that the call to this API is idempotent.customer_metadata_properties (
Union
[IResolvable
,Mapping
[str
,str
],None
]) – The metadata properties for the model package.domain (
Optional
[str
]) – The machine learning domain of your model package and its components. Common machine learning domains include computer vision and natural language processing.drift_check_baselines (
Union
[IResolvable
,DriftCheckBaselinesProperty
,Dict
[str
,Any
],None
]) – Represents the drift check baselines that can be used when the model monitor is set using the model package.inference_specification (
Union
[IResolvable
,InferenceSpecificationProperty
,Dict
[str
,Any
],None
]) – Defines how to perform inference generation after a training job is run.last_modified_time (
Optional
[str
]) – The last time the model package was modified.metadata_properties (
Union
[IResolvable
,MetadataPropertiesProperty
,Dict
[str
,Any
],None
]) – Metadata properties of the tracking entity, trial, or trial component.model_approval_status (
Optional
[str
]) – The approval status of the model. This can be one of the following values. -APPROVED
- The model is approved -REJECTED
- The model is rejected. -PENDING_MANUAL_APPROVAL
- The model is waiting for manual approval.model_card (
Union
[IResolvable
,ModelCardProperty
,Dict
[str
,Any
],None
]) – An Amazon SageMaker Model Card.model_metrics (
Union
[IResolvable
,ModelMetricsProperty
,Dict
[str
,Any
],None
]) – Metrics for the model.model_package_description (
Optional
[str
]) – The description of the model package.model_package_group_name (
Optional
[str
]) – The model group to which the model belongs.model_package_name (
Optional
[str
]) – The name of the model.model_package_status_details (
Union
[IResolvable
,ModelPackageStatusDetailsProperty
,Dict
[str
,Any
],None
]) – Specifies the validation and image scan statuses of the model package.model_package_version (
Union
[int
,float
,None
]) – The version number of a versioned model.sample_payload_url (
Optional
[str
]) – The Amazon Simple Storage Service path where the sample payload are stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix).security_config (
Union
[IResolvable
,SecurityConfigProperty
,Dict
[str
,Any
],None
]) – An optional AWS Key Management Service key to encrypt, decrypt, and re-encrypt model package information for regulated workloads with highly sensitive data.skip_model_validation (
Optional
[str
]) – Indicates if you want to skip model validation.source_algorithm_specification (
Union
[IResolvable
,SourceAlgorithmSpecificationProperty
,Dict
[str
,Any
],None
]) – A list of algorithms that were used to create a model package.source_uri (
Optional
[str
]) – The URI of the source for the model package.tags (
Optional
[Sequence
[Union
[CfnTag
,Dict
[str
,Any
]]]]) – A list of the tags associated with the model package. For more information, see Tagging AWS resources in the AWS General Reference Guide .task (
Optional
[str
]) – The machine learning task your model package accomplishes. Common machine learning tasks include object detection and image classification.validation_specification (
Union
[IResolvable
,ValidationSpecificationProperty
,Dict
[str
,Any
],None
]) – Specifies batch transform jobs that SageMaker runs to validate your model package.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_sagemaker as sagemaker # model_input: Any cfn_model_package_props = sagemaker.CfnModelPackageProps( additional_inference_specifications=[sagemaker.CfnModelPackage.AdditionalInferenceSpecificationDefinitionProperty( containers=[sagemaker.CfnModelPackage.ModelPackageContainerDefinitionProperty( image="image", # the properties below are optional container_hostname="containerHostname", environment={ "environment_key": "environment" }, framework="framework", framework_version="frameworkVersion", image_digest="imageDigest", model_data_source=sagemaker.CfnModelPackage.ModelDataSourceProperty( s3_data_source=sagemaker.CfnModelPackage.S3ModelDataSourceProperty( compression_type="compressionType", s3_data_type="s3DataType", s3_uri="s3Uri", # the properties below are optional model_access_config=sagemaker.CfnModelPackage.ModelAccessConfigProperty( accept_eula=False ) ) ), model_data_url="modelDataUrl", model_input=model_input, nearest_model_name="nearestModelName" )], name="name", # the properties below are optional description="description", supported_content_types=["supportedContentTypes"], supported_realtime_inference_instance_types=["supportedRealtimeInferenceInstanceTypes"], supported_response_mime_types=["supportedResponseMimeTypes"], supported_transform_instance_types=["supportedTransformInstanceTypes"] )], additional_inference_specifications_to_add=[sagemaker.CfnModelPackage.AdditionalInferenceSpecificationDefinitionProperty( containers=[sagemaker.CfnModelPackage.ModelPackageContainerDefinitionProperty( image="image", # the properties below are optional container_hostname="containerHostname", environment={ "environment_key": "environment" }, framework="framework", framework_version="frameworkVersion", image_digest="imageDigest", model_data_source=sagemaker.CfnModelPackage.ModelDataSourceProperty( s3_data_source=sagemaker.CfnModelPackage.S3ModelDataSourceProperty( compression_type="compressionType", s3_data_type="s3DataType", s3_uri="s3Uri", # the properties below are optional model_access_config=sagemaker.CfnModelPackage.ModelAccessConfigProperty( accept_eula=False ) ) ), model_data_url="modelDataUrl", model_input=model_input, nearest_model_name="nearestModelName" )], name="name", # the properties below are optional description="description", supported_content_types=["supportedContentTypes"], supported_realtime_inference_instance_types=["supportedRealtimeInferenceInstanceTypes"], supported_response_mime_types=["supportedResponseMimeTypes"], supported_transform_instance_types=["supportedTransformInstanceTypes"] )], approval_description="approvalDescription", certify_for_marketplace=False, client_token="clientToken", customer_metadata_properties={ "customer_metadata_properties_key": "customerMetadataProperties" }, domain="domain", drift_check_baselines=sagemaker.CfnModelPackage.DriftCheckBaselinesProperty( bias=sagemaker.CfnModelPackage.DriftCheckBiasProperty( config_file=sagemaker.CfnModelPackage.FileSourceProperty( s3_uri="s3Uri", # the properties below are optional content_digest="contentDigest", content_type="contentType" ), post_training_constraints=sagemaker.CfnModelPackage.MetricsSourceProperty( content_type="contentType", s3_uri="s3Uri", # the properties below are optional content_digest="contentDigest" ), pre_training_constraints=sagemaker.CfnModelPackage.MetricsSourceProperty( content_type="contentType", s3_uri="s3Uri", # the properties below are optional content_digest="contentDigest" ) ), explainability=sagemaker.CfnModelPackage.DriftCheckExplainabilityProperty( config_file=sagemaker.CfnModelPackage.FileSourceProperty( s3_uri="s3Uri", # the properties below are optional content_digest="contentDigest", content_type="contentType" ), constraints=sagemaker.CfnModelPackage.MetricsSourceProperty( content_type="contentType", s3_uri="s3Uri", # the properties below are optional content_digest="contentDigest" ) ), model_data_quality=sagemaker.CfnModelPackage.DriftCheckModelDataQualityProperty( constraints=sagemaker.CfnModelPackage.MetricsSourceProperty( content_type="contentType", s3_uri="s3Uri", # the properties below are optional content_digest="contentDigest" ), statistics=sagemaker.CfnModelPackage.MetricsSourceProperty( content_type="contentType", s3_uri="s3Uri", # the properties below are optional content_digest="contentDigest" ) ), model_quality=sagemaker.CfnModelPackage.DriftCheckModelQualityProperty( constraints=sagemaker.CfnModelPackage.MetricsSourceProperty( content_type="contentType", s3_uri="s3Uri", # the properties below are optional content_digest="contentDigest" ), statistics=sagemaker.CfnModelPackage.MetricsSourceProperty( content_type="contentType", s3_uri="s3Uri", # the properties below are optional content_digest="contentDigest" ) ) ), inference_specification=sagemaker.CfnModelPackage.InferenceSpecificationProperty( containers=[sagemaker.CfnModelPackage.ModelPackageContainerDefinitionProperty( image="image", # the properties below are optional container_hostname="containerHostname", environment={ "environment_key": "environment" }, framework="framework", framework_version="frameworkVersion", image_digest="imageDigest", model_data_source=sagemaker.CfnModelPackage.ModelDataSourceProperty( s3_data_source=sagemaker.CfnModelPackage.S3ModelDataSourceProperty( compression_type="compressionType", s3_data_type="s3DataType", s3_uri="s3Uri", # the properties below are optional model_access_config=sagemaker.CfnModelPackage.ModelAccessConfigProperty( accept_eula=False ) ) ), model_data_url="modelDataUrl", model_input=model_input, nearest_model_name="nearestModelName" )], supported_content_types=["supportedContentTypes"], supported_response_mime_types=["supportedResponseMimeTypes"], # the properties below are optional supported_realtime_inference_instance_types=["supportedRealtimeInferenceInstanceTypes"], supported_transform_instance_types=["supportedTransformInstanceTypes"] ), last_modified_time="lastModifiedTime", metadata_properties=sagemaker.CfnModelPackage.MetadataPropertiesProperty( commit_id="commitId", generated_by="generatedBy", project_id="projectId", repository="repository" ), model_approval_status="modelApprovalStatus", model_card=sagemaker.CfnModelPackage.ModelCardProperty( model_card_content="modelCardContent", model_card_status="modelCardStatus" ), model_metrics=sagemaker.CfnModelPackage.ModelMetricsProperty( bias=sagemaker.CfnModelPackage.BiasProperty( post_training_report=sagemaker.CfnModelPackage.MetricsSourceProperty( content_type="contentType", s3_uri="s3Uri", # the properties below are optional content_digest="contentDigest" ), pre_training_report=sagemaker.CfnModelPackage.MetricsSourceProperty( content_type="contentType", s3_uri="s3Uri", # the properties below are optional content_digest="contentDigest" ), report=sagemaker.CfnModelPackage.MetricsSourceProperty( content_type="contentType", s3_uri="s3Uri", # the properties below are optional content_digest="contentDigest" ) ), explainability=sagemaker.CfnModelPackage.ExplainabilityProperty( report=sagemaker.CfnModelPackage.MetricsSourceProperty( content_type="contentType", s3_uri="s3Uri", # the properties below are optional content_digest="contentDigest" ) ), model_data_quality=sagemaker.CfnModelPackage.ModelDataQualityProperty( constraints=sagemaker.CfnModelPackage.MetricsSourceProperty( content_type="contentType", s3_uri="s3Uri", # the properties below are optional content_digest="contentDigest" ), statistics=sagemaker.CfnModelPackage.MetricsSourceProperty( content_type="contentType", s3_uri="s3Uri", # the properties below are optional content_digest="contentDigest" ) ), model_quality=sagemaker.CfnModelPackage.ModelQualityProperty( constraints=sagemaker.CfnModelPackage.MetricsSourceProperty( content_type="contentType", s3_uri="s3Uri", # the properties below are optional content_digest="contentDigest" ), statistics=sagemaker.CfnModelPackage.MetricsSourceProperty( content_type="contentType", s3_uri="s3Uri", # the properties below are optional content_digest="contentDigest" ) ) ), model_package_description="modelPackageDescription", model_package_group_name="modelPackageGroupName", model_package_name="modelPackageName", model_package_status_details=sagemaker.CfnModelPackage.ModelPackageStatusDetailsProperty( validation_statuses=[sagemaker.CfnModelPackage.ModelPackageStatusItemProperty( name="name", status="status", # the properties below are optional failure_reason="failureReason" )] ), model_package_version=123, sample_payload_url="samplePayloadUrl", security_config=sagemaker.CfnModelPackage.SecurityConfigProperty( kms_key_id="kmsKeyId" ), skip_model_validation="skipModelValidation", source_algorithm_specification=sagemaker.CfnModelPackage.SourceAlgorithmSpecificationProperty( source_algorithms=[sagemaker.CfnModelPackage.SourceAlgorithmProperty( algorithm_name="algorithmName", # the properties below are optional model_data_url="modelDataUrl" )] ), source_uri="sourceUri", tags=[CfnTag( key="key", value="value" )], task="task", validation_specification=sagemaker.CfnModelPackage.ValidationSpecificationProperty( validation_profiles=[sagemaker.CfnModelPackage.ValidationProfileProperty( profile_name="profileName", transform_job_definition=sagemaker.CfnModelPackage.TransformJobDefinitionProperty( transform_input=sagemaker.CfnModelPackage.TransformInputProperty( data_source=sagemaker.CfnModelPackage.DataSourceProperty( s3_data_source=sagemaker.CfnModelPackage.S3DataSourceProperty( s3_data_type="s3DataType", s3_uri="s3Uri" ) ), # the properties below are optional compression_type="compressionType", content_type="contentType", split_type="splitType" ), transform_output=sagemaker.CfnModelPackage.TransformOutputProperty( s3_output_path="s3OutputPath", # the properties below are optional accept="accept", assemble_with="assembleWith", kms_key_id="kmsKeyId" ), transform_resources=sagemaker.CfnModelPackage.TransformResourcesProperty( instance_count=123, instance_type="instanceType", # the properties below are optional volume_kms_key_id="volumeKmsKeyId" ), # the properties below are optional batch_strategy="batchStrategy", environment={ "environment_key": "environment" }, max_concurrent_transforms=123, max_payload_in_mb=123 ) )], validation_role="validationRole" ) )
Attributes
- additional_inference_specifications
An array of additional Inference Specification objects.
- additional_inference_specifications_to_add
An array of additional Inference Specification objects to be added to the existing array.
The total number of additional Inference Specification objects cannot exceed 15. Each additional Inference Specification object specifies artifacts based on this model package that can be used on inference endpoints. Generally used with SageMaker Neo to store the compiled artifacts.
- approval_description
A description provided when the model approval is set.
- certify_for_marketplace
Whether the model package is to be certified to be listed on AWS Marketplace.
For information about listing model packages on AWS Marketplace, see List Your Algorithm or Model Package on AWS Marketplace .
- client_token
A unique token that guarantees that the call to this API is idempotent.
- customer_metadata_properties
The metadata properties for the model package.
- domain
The machine learning domain of your model package and its components.
Common machine learning domains include computer vision and natural language processing.
- drift_check_baselines
Represents the drift check baselines that can be used when the model monitor is set using the model package.
- inference_specification
Defines how to perform inference generation after a training job is run.
- last_modified_time
The last time the model package was modified.
- metadata_properties
Metadata properties of the tracking entity, trial, or trial component.
- model_approval_status
The approval status of the model. This can be one of the following values.
APPROVED
- The model is approvedREJECTED
- The model is rejected.PENDING_MANUAL_APPROVAL
- The model is waiting for manual approval.
- model_card
An Amazon SageMaker Model Card.
- model_metrics
Metrics for the model.
- model_package_description
The description of the model package.
- model_package_group_name
The model group to which the model belongs.
- model_package_name
The name of the model.
- model_package_status_details
Specifies the validation and image scan statuses of the model package.
- model_package_version
The version number of a versioned model.
- sample_payload_url
The Amazon Simple Storage Service path where the sample payload are stored.
This path must point to a single gzip compressed tar archive (.tar.gz suffix).
- security_config
An optional AWS Key Management Service key to encrypt, decrypt, and re-encrypt model package information for regulated workloads with highly sensitive data.
- skip_model_validation
Indicates if you want to skip model validation.
- source_algorithm_specification
A list of algorithms that were used to create a model package.
- source_uri
The URI of the source for the model package.
- tags
A list of the tags associated with the model package.
For more information, see Tagging AWS resources in the AWS General Reference Guide .
- task
The machine learning task your model package accomplishes.
Common machine learning tasks include object detection and image classification.
- validation_specification
Specifies batch transform jobs that SageMaker runs to validate your model package.