interface CfnModelPackageProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Sagemaker.CfnModelPackageProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awssagemaker#CfnModelPackageProps |
Java | software.amazon.awscdk.services.sagemaker.CfnModelPackageProps |
Python | aws_cdk.aws_sagemaker.CfnModelPackageProps |
TypeScript | aws-cdk-lib » aws_sagemaker » CfnModelPackageProps |
Properties for defining a CfnModelPackage
.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';
declare const modelInput: any;
const cfnModelPackageProps: sagemaker.CfnModelPackageProps = {
additionalInferenceSpecifications: [{
containers: [{
image: 'image',
// the properties below are optional
containerHostname: 'containerHostname',
environment: {
environmentKey: 'environment',
},
framework: 'framework',
frameworkVersion: 'frameworkVersion',
imageDigest: 'imageDigest',
modelDataSource: {
s3DataSource: {
compressionType: 'compressionType',
s3DataType: 's3DataType',
s3Uri: 's3Uri',
// the properties below are optional
modelAccessConfig: {
acceptEula: false,
},
},
},
modelDataUrl: 'modelDataUrl',
modelInput: modelInput,
nearestModelName: 'nearestModelName',
}],
name: 'name',
// the properties below are optional
description: 'description',
supportedContentTypes: ['supportedContentTypes'],
supportedRealtimeInferenceInstanceTypes: ['supportedRealtimeInferenceInstanceTypes'],
supportedResponseMimeTypes: ['supportedResponseMimeTypes'],
supportedTransformInstanceTypes: ['supportedTransformInstanceTypes'],
}],
additionalInferenceSpecificationsToAdd: [{
containers: [{
image: 'image',
// the properties below are optional
containerHostname: 'containerHostname',
environment: {
environmentKey: 'environment',
},
framework: 'framework',
frameworkVersion: 'frameworkVersion',
imageDigest: 'imageDigest',
modelDataSource: {
s3DataSource: {
compressionType: 'compressionType',
s3DataType: 's3DataType',
s3Uri: 's3Uri',
// the properties below are optional
modelAccessConfig: {
acceptEula: false,
},
},
},
modelDataUrl: 'modelDataUrl',
modelInput: modelInput,
nearestModelName: 'nearestModelName',
}],
name: 'name',
// the properties below are optional
description: 'description',
supportedContentTypes: ['supportedContentTypes'],
supportedRealtimeInferenceInstanceTypes: ['supportedRealtimeInferenceInstanceTypes'],
supportedResponseMimeTypes: ['supportedResponseMimeTypes'],
supportedTransformInstanceTypes: ['supportedTransformInstanceTypes'],
}],
approvalDescription: 'approvalDescription',
certifyForMarketplace: false,
clientToken: 'clientToken',
customerMetadataProperties: {
customerMetadataPropertiesKey: 'customerMetadataProperties',
},
domain: 'domain',
driftCheckBaselines: {
bias: {
configFile: {
s3Uri: 's3Uri',
// the properties below are optional
contentDigest: 'contentDigest',
contentType: 'contentType',
},
postTrainingConstraints: {
contentType: 'contentType',
s3Uri: 's3Uri',
// the properties below are optional
contentDigest: 'contentDigest',
},
preTrainingConstraints: {
contentType: 'contentType',
s3Uri: 's3Uri',
// the properties below are optional
contentDigest: 'contentDigest',
},
},
explainability: {
configFile: {
s3Uri: 's3Uri',
// the properties below are optional
contentDigest: 'contentDigest',
contentType: 'contentType',
},
constraints: {
contentType: 'contentType',
s3Uri: 's3Uri',
// the properties below are optional
contentDigest: 'contentDigest',
},
},
modelDataQuality: {
constraints: {
contentType: 'contentType',
s3Uri: 's3Uri',
// the properties below are optional
contentDigest: 'contentDigest',
},
statistics: {
contentType: 'contentType',
s3Uri: 's3Uri',
// the properties below are optional
contentDigest: 'contentDigest',
},
},
modelQuality: {
constraints: {
contentType: 'contentType',
s3Uri: 's3Uri',
// the properties below are optional
contentDigest: 'contentDigest',
},
statistics: {
contentType: 'contentType',
s3Uri: 's3Uri',
// the properties below are optional
contentDigest: 'contentDigest',
},
},
},
inferenceSpecification: {
containers: [{
image: 'image',
// the properties below are optional
containerHostname: 'containerHostname',
environment: {
environmentKey: 'environment',
},
framework: 'framework',
frameworkVersion: 'frameworkVersion',
imageDigest: 'imageDigest',
modelDataSource: {
s3DataSource: {
compressionType: 'compressionType',
s3DataType: 's3DataType',
s3Uri: 's3Uri',
// the properties below are optional
modelAccessConfig: {
acceptEula: false,
},
},
},
modelDataUrl: 'modelDataUrl',
modelInput: modelInput,
nearestModelName: 'nearestModelName',
}],
supportedContentTypes: ['supportedContentTypes'],
supportedResponseMimeTypes: ['supportedResponseMimeTypes'],
// the properties below are optional
supportedRealtimeInferenceInstanceTypes: ['supportedRealtimeInferenceInstanceTypes'],
supportedTransformInstanceTypes: ['supportedTransformInstanceTypes'],
},
lastModifiedTime: 'lastModifiedTime',
metadataProperties: {
commitId: 'commitId',
generatedBy: 'generatedBy',
projectId: 'projectId',
repository: 'repository',
},
modelApprovalStatus: 'modelApprovalStatus',
modelCard: {
modelCardContent: 'modelCardContent',
modelCardStatus: 'modelCardStatus',
},
modelMetrics: {
bias: {
postTrainingReport: {
contentType: 'contentType',
s3Uri: 's3Uri',
// the properties below are optional
contentDigest: 'contentDigest',
},
preTrainingReport: {
contentType: 'contentType',
s3Uri: 's3Uri',
// the properties below are optional
contentDigest: 'contentDigest',
},
report: {
contentType: 'contentType',
s3Uri: 's3Uri',
// the properties below are optional
contentDigest: 'contentDigest',
},
},
explainability: {
report: {
contentType: 'contentType',
s3Uri: 's3Uri',
// the properties below are optional
contentDigest: 'contentDigest',
},
},
modelDataQuality: {
constraints: {
contentType: 'contentType',
s3Uri: 's3Uri',
// the properties below are optional
contentDigest: 'contentDigest',
},
statistics: {
contentType: 'contentType',
s3Uri: 's3Uri',
// the properties below are optional
contentDigest: 'contentDigest',
},
},
modelQuality: {
constraints: {
contentType: 'contentType',
s3Uri: 's3Uri',
// the properties below are optional
contentDigest: 'contentDigest',
},
statistics: {
contentType: 'contentType',
s3Uri: 's3Uri',
// the properties below are optional
contentDigest: 'contentDigest',
},
},
},
modelPackageDescription: 'modelPackageDescription',
modelPackageGroupName: 'modelPackageGroupName',
modelPackageName: 'modelPackageName',
modelPackageStatusDetails: {
validationStatuses: [{
name: 'name',
status: 'status',
// the properties below are optional
failureReason: 'failureReason',
}],
},
modelPackageVersion: 123,
samplePayloadUrl: 'samplePayloadUrl',
securityConfig: {
kmsKeyId: 'kmsKeyId',
},
skipModelValidation: 'skipModelValidation',
sourceAlgorithmSpecification: {
sourceAlgorithms: [{
algorithmName: 'algorithmName',
// the properties below are optional
modelDataUrl: 'modelDataUrl',
}],
},
sourceUri: 'sourceUri',
tags: [{
key: 'key',
value: 'value',
}],
task: 'task',
validationSpecification: {
validationProfiles: [{
profileName: 'profileName',
transformJobDefinition: {
transformInput: {
dataSource: {
s3DataSource: {
s3DataType: 's3DataType',
s3Uri: 's3Uri',
},
},
// the properties below are optional
compressionType: 'compressionType',
contentType: 'contentType',
splitType: 'splitType',
},
transformOutput: {
s3OutputPath: 's3OutputPath',
// the properties below are optional
accept: 'accept',
assembleWith: 'assembleWith',
kmsKeyId: 'kmsKeyId',
},
transformResources: {
instanceCount: 123,
instanceType: 'instanceType',
// the properties below are optional
volumeKmsKeyId: 'volumeKmsKeyId',
},
// the properties below are optional
batchStrategy: 'batchStrategy',
environment: {
environmentKey: 'environment',
},
maxConcurrentTransforms: 123,
maxPayloadInMb: 123,
},
}],
validationRole: 'validationRole',
},
};
Properties
Name | Type | Description |
---|---|---|
additional | IResolvable | IResolvable | Additional [] | An array of additional Inference Specification objects. |
additional | IResolvable | IResolvable | Additional [] | An array of additional Inference Specification objects to be added to the existing array. |
approval | string | A description provided when the model approval is set. |
certify | boolean | IResolvable | Whether the model package is to be certified to be listed on AWS Marketplace. |
client | string | A unique token that guarantees that the call to this API is idempotent. |
customer | IResolvable | { [string]: string } | The metadata properties for the model package. |
domain? | string | The machine learning domain of your model package and its components. |
drift | IResolvable | Drift | Represents the drift check baselines that can be used when the model monitor is set using the model package. |
inference | IResolvable | Inference | Defines how to perform inference generation after a training job is run. |
last | string | The last time the model package was modified. |
metadata | IResolvable | Metadata | Metadata properties of the tracking entity, trial, or trial component. |
model | string | The approval status of the model. This can be one of the following values. |
model | IResolvable | Model | An Amazon SageMaker Model Card. |
model | IResolvable | Model | Metrics for the model. |
model | string | The description of the model package. |
model | string | The model group to which the model belongs. |
model | string | The name of the model. |
model | IResolvable | Model | Specifies the validation and image scan statuses of the model package. |
model | number | The version number of a versioned model. |
sample | string | The Amazon Simple Storage Service path where the sample payload are stored. |
security | IResolvable | Security | An optional AWS Key Management Service key to encrypt, decrypt, and re-encrypt model package information for regulated workloads with highly sensitive data. |
skip | string | Indicates if you want to skip model validation. |
source | IResolvable | Source | A list of algorithms that were used to create a model package. |
source | string | The URI of the source for the model package. |
tags? | Cfn [] | A list of the tags associated with the model package. |
task? | string | The machine learning task your model package accomplishes. |
validation | IResolvable | Validation | Specifies batch transform jobs that SageMaker runs to validate your model package. |
additionalInferenceSpecifications?
Type:
IResolvable
|
IResolvable
|
Additional
[]
(optional)
An array of additional Inference Specification objects.
additionalInferenceSpecificationsToAdd?
Type:
IResolvable
|
IResolvable
|
Additional
[]
(optional)
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.
approvalDescription?
Type:
string
(optional)
A description provided when the model approval is set.
certifyForMarketplace?
Type:
boolean |
IResolvable
(optional)
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 .
clientToken?
Type:
string
(optional)
A unique token that guarantees that the call to this API is idempotent.
customerMetadataProperties?
Type:
IResolvable
| { [string]: string }
(optional)
The metadata properties for the model package.
domain?
Type:
string
(optional)
The machine learning domain of your model package and its components.
Common machine learning domains include computer vision and natural language processing.
driftCheckBaselines?
Type:
IResolvable
|
Drift
(optional)
Represents the drift check baselines that can be used when the model monitor is set using the model package.
inferenceSpecification?
Type:
IResolvable
|
Inference
(optional)
Defines how to perform inference generation after a training job is run.
lastModifiedTime?
Type:
string
(optional)
The last time the model package was modified.
metadataProperties?
Type:
IResolvable
|
Metadata
(optional)
Metadata properties of the tracking entity, trial, or trial component.
modelApprovalStatus?
Type:
string
(optional)
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.
modelCard?
Type:
IResolvable
|
Model
(optional)
An Amazon SageMaker Model Card.
modelMetrics?
Type:
IResolvable
|
Model
(optional)
Metrics for the model.
modelPackageDescription?
Type:
string
(optional)
The description of the model package.
modelPackageGroupName?
Type:
string
(optional)
The model group to which the model belongs.
modelPackageName?
Type:
string
(optional)
The name of the model.
modelPackageStatusDetails?
Type:
IResolvable
|
Model
(optional)
Specifies the validation and image scan statuses of the model package.
modelPackageVersion?
Type:
number
(optional)
The version number of a versioned model.
samplePayloadUrl?
Type:
string
(optional)
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).
securityConfig?
Type:
IResolvable
|
Security
(optional)
An optional AWS Key Management Service key to encrypt, decrypt, and re-encrypt model package information for regulated workloads with highly sensitive data.
skipModelValidation?
Type:
string
(optional)
Indicates if you want to skip model validation.
sourceAlgorithmSpecification?
Type:
IResolvable
|
Source
(optional)
A list of algorithms that were used to create a model package.
sourceUri?
Type:
string
(optional)
The URI of the source for the model package.
tags?
Type:
Cfn
[]
(optional)
A list of the tags associated with the model package.
For more information, see Tagging AWS resources in the AWS General Reference Guide .
task?
Type:
string
(optional)
The machine learning task your model package accomplishes.
Common machine learning tasks include object detection and image classification.
validationSpecification?
Type:
IResolvable
|
Validation
(optional)
Specifies batch transform jobs that SageMaker runs to validate your model package.