aws-cdk-lib.aws_sagemaker.CfnModelPackageProps

interface CfnModelPackageProps

LanguageType name
.NETAmazon.CDK.AWS.Sagemaker.CfnModelPackageProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awssagemaker#CfnModelPackageProps
Javasoftware.amazon.awscdk.services.sagemaker.CfnModelPackageProps
Pythonaws_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',
      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',
      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',
      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',
  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',
  sourceAlgorithmSpecification: {
    sourceAlgorithms: [{
      algorithmName: 'algorithmName',

      // the properties below are optional
      modelDataUrl: 'modelDataUrl',
    }],
  },
  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

NameTypeDescription
additionalInferenceSpecifications?IResolvable | IResolvable | AdditionalInferenceSpecificationDefinitionProperty[]An array of additional Inference Specification objects.
additionalInferenceSpecificationsToAdd?IResolvable | IResolvable | AdditionalInferenceSpecificationDefinitionProperty[]An array of additional Inference Specification objects to be added to the existing array.
approvalDescription?stringA description provided when the model approval is set.
certifyForMarketplace?boolean | IResolvableWhether the model package is to be certified to be listed on AWS Marketplace.
clientToken?stringA unique token that guarantees that the call to this API is idempotent.
customerMetadataProperties?IResolvable | { [string]: string }The metadata properties for the model package.
domain?stringThe machine learning domain of your model package and its components.
driftCheckBaselines?IResolvable | DriftCheckBaselinesPropertyRepresents the drift check baselines that can be used when the model monitor is set using the model package.
inferenceSpecification?IResolvable | InferenceSpecificationPropertyDefines how to perform inference generation after a training job is run.
lastModifiedTime?stringThe last time the model package was modified.
metadataProperties?IResolvable | MetadataPropertiesPropertyMetadata properties of the tracking entity, trial, or trial component.
modelApprovalStatus?stringThe approval status of the model. This can be one of the following values.
modelMetrics?IResolvable | ModelMetricsPropertyMetrics for the model.
modelPackageDescription?stringThe description of the model package.
modelPackageGroupName?stringThe model group to which the model belongs.
modelPackageName?stringThe name of the model.
modelPackageStatusDetails?IResolvable | ModelPackageStatusDetailsPropertySpecifies the validation and image scan statuses of the model package.
modelPackageVersion?numberThe version number of a versioned model.
samplePayloadUrl?stringThe Amazon Simple Storage Service path where the sample payload are stored.
sourceAlgorithmSpecification?IResolvable | SourceAlgorithmSpecificationPropertyA list of algorithms that were used to create a model package.
tags?CfnTag[]A list of the tags associated with the model package.
task?stringThe machine learning task your model package accomplishes.
validationSpecification?IResolvable | ValidationSpecificationPropertySpecifies batch transform jobs that SageMaker runs to validate your model package.

additionalInferenceSpecifications?

Type: IResolvable | IResolvable | AdditionalInferenceSpecificationDefinitionProperty[] (optional)

An array of additional Inference Specification objects.


additionalInferenceSpecificationsToAdd?

Type: IResolvable | IResolvable | AdditionalInferenceSpecificationDefinitionProperty[] (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 | DriftCheckBaselinesProperty (optional)

Represents the drift check baselines that can be used when the model monitor is set using the model package.


inferenceSpecification?

Type: IResolvable | InferenceSpecificationProperty (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 | MetadataPropertiesProperty (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 approved
  • REJECTED - The model is rejected.
  • PENDING_MANUAL_APPROVAL - The model is waiting for manual approval.

modelMetrics?

Type: IResolvable | ModelMetricsProperty (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 | ModelPackageStatusDetailsProperty (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).


sourceAlgorithmSpecification?

Type: IResolvable | SourceAlgorithmSpecificationProperty (optional)

A list of algorithms that were used to create a model package.


tags?

Type: CfnTag[] (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 | ValidationSpecificationProperty (optional)

Specifies batch transform jobs that SageMaker runs to validate your model package.