From 06093eb0316c24d563a92d5df2e4ed5f9e56f26a Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 29 Feb 2024 19:15:18 +0000 Subject: [PATCH] feat(client-sagemaker): Adds support for ModelDataSource in Model Packages to support unzipped models. Adds support to specify SourceUri for models which allows registration of models without mandating a container for hosting. Using SourceUri, customers can decouple the model from hosting information during registration. --- .../BatchDescribeModelPackageCommand.ts | 10 + .../src/commands/CreateAlgorithmCommand.ts | 10 + .../src/commands/CreateModelCommand.ts | 3 - .../src/commands/CreateModelPackageCommand.ts | 31 ++ .../src/commands/DescribeAlgorithmCommand.ts | 10 + .../commands/DescribeModelPackageCommand.ts | 31 ++ .../src/commands/SearchCommand.ts | 53 ++- .../src/commands/UpdateFeatureGroupCommand.ts | 5 +- .../src/commands/UpdateModelPackageCommand.ts | 58 +++ .../client-sagemaker/src/models/models_0.ts | 360 +++++++++--------- .../client-sagemaker/src/models/models_1.ts | 21 +- .../client-sagemaker/src/models/models_2.ts | 13 +- .../client-sagemaker/src/models/models_4.ts | 38 +- .../src/protocols/Aws_json1_1.ts | 5 + codegen/sdk-codegen/aws-models/sagemaker.json | 74 +++- 15 files changed, 502 insertions(+), 220 deletions(-) diff --git a/clients/client-sagemaker/src/commands/BatchDescribeModelPackageCommand.ts b/clients/client-sagemaker/src/commands/BatchDescribeModelPackageCommand.ts index 4b9474110c60..2ac8e940bb09 100644 --- a/clients/client-sagemaker/src/commands/BatchDescribeModelPackageCommand.ts +++ b/clients/client-sagemaker/src/commands/BatchDescribeModelPackageCommand.ts @@ -57,6 +57,16 @@ export interface BatchDescribeModelPackageCommandOutput extends BatchDescribeMod * // Image: "STRING_VALUE", // required * // ImageDigest: "STRING_VALUE", * // ModelDataUrl: "STRING_VALUE", + * // ModelDataSource: { // ModelDataSource + * // S3DataSource: { // S3ModelDataSource + * // S3Uri: "STRING_VALUE", // required + * // S3DataType: "S3Prefix" || "S3Object", // required + * // CompressionType: "None" || "Gzip", // required + * // ModelAccessConfig: { // ModelAccessConfig + * // AcceptEula: true || false, // required + * // }, + * // }, + * // }, * // ProductId: "STRING_VALUE", * // Environment: { // EnvironmentMap * // "": "STRING_VALUE", diff --git a/clients/client-sagemaker/src/commands/CreateAlgorithmCommand.ts b/clients/client-sagemaker/src/commands/CreateAlgorithmCommand.ts index 8446cc18f30e..f9c0507642e4 100644 --- a/clients/client-sagemaker/src/commands/CreateAlgorithmCommand.ts +++ b/clients/client-sagemaker/src/commands/CreateAlgorithmCommand.ts @@ -111,6 +111,16 @@ export interface CreateAlgorithmCommandOutput extends CreateAlgorithmOutput, __M * Image: "STRING_VALUE", // required * ImageDigest: "STRING_VALUE", * ModelDataUrl: "STRING_VALUE", + * ModelDataSource: { // ModelDataSource + * S3DataSource: { // S3ModelDataSource + * S3Uri: "STRING_VALUE", // required + * S3DataType: "S3Prefix" || "S3Object", // required + * CompressionType: "None" || "Gzip", // required + * ModelAccessConfig: { // ModelAccessConfig + * AcceptEula: true || false, // required + * }, + * }, + * }, * ProductId: "STRING_VALUE", * Environment: { // EnvironmentMap * "": "STRING_VALUE", diff --git a/clients/client-sagemaker/src/commands/CreateModelCommand.ts b/clients/client-sagemaker/src/commands/CreateModelCommand.ts index bf84722da307..8e576caf3737 100644 --- a/clients/client-sagemaker/src/commands/CreateModelCommand.ts +++ b/clients/client-sagemaker/src/commands/CreateModelCommand.ts @@ -38,9 +38,6 @@ export interface CreateModelCommandOutput extends CreateModelOutput, __MetadataB * CreateEndpointConfig API, and then create an endpoint with the * CreateEndpoint API. SageMaker then deploys all of the containers that you * defined for the model in the hosting environment.

- *

For an example that calls this method when deploying a model to SageMaker hosting services, - * see Create a Model (Amazon Web Services SDK for Python (Boto 3)). - *

*

To run a batch transform using your model, you start a job with the * CreateTransformJob API. SageMaker uses your model and your dataset to get * inferences which are then saved to a specified S3 location.

diff --git a/clients/client-sagemaker/src/commands/CreateModelPackageCommand.ts b/clients/client-sagemaker/src/commands/CreateModelPackageCommand.ts index a8a00f85e1f4..828108cda87c 100644 --- a/clients/client-sagemaker/src/commands/CreateModelPackageCommand.ts +++ b/clients/client-sagemaker/src/commands/CreateModelPackageCommand.ts @@ -65,6 +65,16 @@ export interface CreateModelPackageCommandOutput extends CreateModelPackageOutpu * Image: "STRING_VALUE", // required * ImageDigest: "STRING_VALUE", * ModelDataUrl: "STRING_VALUE", + * ModelDataSource: { // ModelDataSource + * S3DataSource: { // S3ModelDataSource + * S3Uri: "STRING_VALUE", // required + * S3DataType: "S3Prefix" || "S3Object", // required + * CompressionType: "None" || "Gzip", // required + * ModelAccessConfig: { // ModelAccessConfig + * AcceptEula: true || false, // required + * }, + * }, + * }, * ProductId: "STRING_VALUE", * Environment: { // EnvironmentMap * "": "STRING_VALUE", @@ -137,6 +147,16 @@ export interface CreateModelPackageCommandOutput extends CreateModelPackageOutpu * SourceAlgorithms: [ // SourceAlgorithmList // required * { // SourceAlgorithm * ModelDataUrl: "STRING_VALUE", + * ModelDataSource: { + * S3DataSource: { + * S3Uri: "STRING_VALUE", // required + * S3DataType: "S3Prefix" || "S3Object", // required + * CompressionType: "None" || "Gzip", // required + * ModelAccessConfig: { + * AcceptEula: true || false, // required + * }, + * }, + * }, * AlgorithmName: "STRING_VALUE", // required * }, * ], @@ -237,6 +257,16 @@ export interface CreateModelPackageCommandOutput extends CreateModelPackageOutpu * Image: "STRING_VALUE", // required * ImageDigest: "STRING_VALUE", * ModelDataUrl: "STRING_VALUE", + * ModelDataSource: { + * S3DataSource: { + * S3Uri: "STRING_VALUE", // required + * S3DataType: "S3Prefix" || "S3Object", // required + * CompressionType: "None" || "Gzip", // required + * ModelAccessConfig: { + * AcceptEula: true || false, // required + * }, + * }, + * }, * ProductId: "STRING_VALUE", * Environment: { * "": "STRING_VALUE", @@ -269,6 +299,7 @@ export interface CreateModelPackageCommandOutput extends CreateModelPackageOutpu * }, * ], * SkipModelValidation: "All" || "None", + * SourceUri: "STRING_VALUE", * }; * const command = new CreateModelPackageCommand(input); * const response = await client.send(command); diff --git a/clients/client-sagemaker/src/commands/DescribeAlgorithmCommand.ts b/clients/client-sagemaker/src/commands/DescribeAlgorithmCommand.ts index 3878416ab78e..eb44a50d154a 100644 --- a/clients/client-sagemaker/src/commands/DescribeAlgorithmCommand.ts +++ b/clients/client-sagemaker/src/commands/DescribeAlgorithmCommand.ts @@ -118,6 +118,16 @@ export interface DescribeAlgorithmCommandOutput extends DescribeAlgorithmOutput, * // Image: "STRING_VALUE", // required * // ImageDigest: "STRING_VALUE", * // ModelDataUrl: "STRING_VALUE", + * // ModelDataSource: { // ModelDataSource + * // S3DataSource: { // S3ModelDataSource + * // S3Uri: "STRING_VALUE", // required + * // S3DataType: "S3Prefix" || "S3Object", // required + * // CompressionType: "None" || "Gzip", // required + * // ModelAccessConfig: { // ModelAccessConfig + * // AcceptEula: true || false, // required + * // }, + * // }, + * // }, * // ProductId: "STRING_VALUE", * // Environment: { // EnvironmentMap * // "": "STRING_VALUE", diff --git a/clients/client-sagemaker/src/commands/DescribeModelPackageCommand.ts b/clients/client-sagemaker/src/commands/DescribeModelPackageCommand.ts index ed62cf0d31d2..5b3fa58815ce 100644 --- a/clients/client-sagemaker/src/commands/DescribeModelPackageCommand.ts +++ b/clients/client-sagemaker/src/commands/DescribeModelPackageCommand.ts @@ -57,6 +57,16 @@ export interface DescribeModelPackageCommandOutput extends DescribeModelPackageO * // Image: "STRING_VALUE", // required * // ImageDigest: "STRING_VALUE", * // ModelDataUrl: "STRING_VALUE", + * // ModelDataSource: { // ModelDataSource + * // S3DataSource: { // S3ModelDataSource + * // S3Uri: "STRING_VALUE", // required + * // S3DataType: "S3Prefix" || "S3Object", // required + * // CompressionType: "None" || "Gzip", // required + * // ModelAccessConfig: { // ModelAccessConfig + * // AcceptEula: true || false, // required + * // }, + * // }, + * // }, * // ProductId: "STRING_VALUE", * // Environment: { // EnvironmentMap * // "": "STRING_VALUE", @@ -91,6 +101,16 @@ export interface DescribeModelPackageCommandOutput extends DescribeModelPackageO * // SourceAlgorithms: [ // SourceAlgorithmList // required * // { // SourceAlgorithm * // ModelDataUrl: "STRING_VALUE", + * // ModelDataSource: { + * // S3DataSource: { + * // S3Uri: "STRING_VALUE", // required + * // S3DataType: "S3Prefix" || "S3Object", // required + * // CompressionType: "None" || "Gzip", // required + * // ModelAccessConfig: { + * // AcceptEula: true || false, // required + * // }, + * // }, + * // }, * // AlgorithmName: "STRING_VALUE", // required * // }, * // ], @@ -261,6 +281,16 @@ export interface DescribeModelPackageCommandOutput extends DescribeModelPackageO * // Image: "STRING_VALUE", // required * // ImageDigest: "STRING_VALUE", * // ModelDataUrl: "STRING_VALUE", + * // ModelDataSource: { + * // S3DataSource: { + * // S3Uri: "STRING_VALUE", // required + * // S3DataType: "S3Prefix" || "S3Object", // required + * // CompressionType: "None" || "Gzip", // required + * // ModelAccessConfig: { + * // AcceptEula: true || false, // required + * // }, + * // }, + * // }, * // ProductId: "STRING_VALUE", * // Environment: { * // "": "STRING_VALUE", @@ -293,6 +323,7 @@ export interface DescribeModelPackageCommandOutput extends DescribeModelPackageO * // }, * // ], * // SkipModelValidation: "All" || "None", + * // SourceUri: "STRING_VALUE", * // }; * * ``` diff --git a/clients/client-sagemaker/src/commands/SearchCommand.ts b/clients/client-sagemaker/src/commands/SearchCommand.ts index 458e9d508f74..a1e12ff6bc5a 100644 --- a/clients/client-sagemaker/src/commands/SearchCommand.ts +++ b/clients/client-sagemaker/src/commands/SearchCommand.ts @@ -1088,6 +1088,16 @@ export interface SearchCommandOutput extends SearchResponse, __MetadataBearer {} * // Image: "STRING_VALUE", // required * // ImageDigest: "STRING_VALUE", * // ModelDataUrl: "STRING_VALUE", + * // ModelDataSource: { // ModelDataSource + * // S3DataSource: { // S3ModelDataSource + * // S3Uri: "STRING_VALUE", // required + * // S3DataType: "S3Prefix" || "S3Object", // required + * // CompressionType: "None" || "Gzip", // required + * // ModelAccessConfig: { // ModelAccessConfig + * // AcceptEula: true || false, // required + * // }, + * // }, + * // }, * // ProductId: "STRING_VALUE", * // Environment: { // EnvironmentMap * // "": "STRING_VALUE", @@ -1122,6 +1132,16 @@ export interface SearchCommandOutput extends SearchResponse, __MetadataBearer {} * // SourceAlgorithms: [ // SourceAlgorithmList // required * // { // SourceAlgorithm * // ModelDataUrl: "STRING_VALUE", + * // ModelDataSource: { + * // S3DataSource: { + * // S3Uri: "STRING_VALUE", // required + * // S3DataType: "S3Prefix" || "S3Object", // required + * // CompressionType: "None" || "Gzip", // required + * // ModelAccessConfig: { + * // AcceptEula: true || false, // required + * // }, + * // }, + * // }, * // AlgorithmName: "STRING_VALUE", // required * // }, * // ], @@ -1244,6 +1264,16 @@ export interface SearchCommandOutput extends SearchResponse, __MetadataBearer {} * // Image: "STRING_VALUE", // required * // ImageDigest: "STRING_VALUE", * // ModelDataUrl: "STRING_VALUE", + * // ModelDataSource: { + * // S3DataSource: { + * // S3Uri: "STRING_VALUE", // required + * // S3DataType: "S3Prefix" || "S3Object", // required + * // CompressionType: "None" || "Gzip", // required + * // ModelAccessConfig: { + * // AcceptEula: true || false, // required + * // }, + * // }, + * // }, * // ProductId: "STRING_VALUE", * // Environment: { * // "": "STRING_VALUE", @@ -1275,6 +1305,7 @@ export interface SearchCommandOutput extends SearchResponse, __MetadataBearer {} * // ], * // }, * // ], + * // SourceUri: "STRING_VALUE", * // Tags: "", * // CustomerMetadataProperties: { // CustomerMetadataMap * // "": "STRING_VALUE", @@ -1783,16 +1814,7 @@ export interface SearchCommandOutput extends SearchResponse, __MetadataBearer {} * // }, * // Mode: "SingleModel" || "MultiModel", * // ModelDataUrl: "STRING_VALUE", - * // ModelDataSource: { // ModelDataSource - * // S3DataSource: { // S3ModelDataSource - * // S3Uri: "STRING_VALUE", // required - * // S3DataType: "S3Prefix" || "S3Object", // required - * // CompressionType: "None" || "Gzip", // required - * // ModelAccessConfig: { // ModelAccessConfig - * // AcceptEula: true || false, // required - * // }, - * // }, - * // }, + * // ModelDataSource: "", * // Environment: "", * // ModelPackageName: "STRING_VALUE", * // InferenceSpecificationName: "STRING_VALUE", @@ -1812,16 +1834,7 @@ export interface SearchCommandOutput extends SearchResponse, __MetadataBearer {} * // }, * // Mode: "SingleModel" || "MultiModel", * // ModelDataUrl: "STRING_VALUE", - * // ModelDataSource: { - * // S3DataSource: { - * // S3Uri: "STRING_VALUE", // required - * // S3DataType: "S3Prefix" || "S3Object", // required - * // CompressionType: "None" || "Gzip", // required - * // ModelAccessConfig: { - * // AcceptEula: true || false, // required - * // }, - * // }, - * // }, + * // ModelDataSource: "", * // Environment: "", * // ModelPackageName: "STRING_VALUE", * // InferenceSpecificationName: "STRING_VALUE", diff --git a/clients/client-sagemaker/src/commands/UpdateFeatureGroupCommand.ts b/clients/client-sagemaker/src/commands/UpdateFeatureGroupCommand.ts index ac24a18067eb..9b855e12628f 100644 --- a/clients/client-sagemaker/src/commands/UpdateFeatureGroupCommand.ts +++ b/clients/client-sagemaker/src/commands/UpdateFeatureGroupCommand.ts @@ -39,7 +39,10 @@ export interface UpdateFeatureGroupCommandOutput extends UpdateFeatureGroupRespo * feature group after the feature group is updated. If a record level * TtlDuration exists from using the PutRecord API, the record * level TtlDuration applies to that record instead of the default - * TtlDuration.

+ * TtlDuration. To remove the default TtlDuration from an + * existing feature group, use the UpdateFeatureGroup API and set the + * TtlDuration + * Unit and Value to null.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-sagemaker/src/commands/UpdateModelPackageCommand.ts b/clients/client-sagemaker/src/commands/UpdateModelPackageCommand.ts index 4e1ef4eacdf3..0c09f31fb36d 100644 --- a/clients/client-sagemaker/src/commands/UpdateModelPackageCommand.ts +++ b/clients/client-sagemaker/src/commands/UpdateModelPackageCommand.ts @@ -55,6 +55,16 @@ export interface UpdateModelPackageCommandOutput extends UpdateModelPackageOutpu * Image: "STRING_VALUE", // required * ImageDigest: "STRING_VALUE", * ModelDataUrl: "STRING_VALUE", + * ModelDataSource: { // ModelDataSource + * S3DataSource: { // S3ModelDataSource + * S3Uri: "STRING_VALUE", // required + * S3DataType: "S3Prefix" || "S3Object", // required + * CompressionType: "None" || "Gzip", // required + * ModelAccessConfig: { // ModelAccessConfig + * AcceptEula: true || false, // required + * }, + * }, + * }, * ProductId: "STRING_VALUE", * Environment: { // EnvironmentMap * "": "STRING_VALUE", @@ -86,6 +96,54 @@ export interface UpdateModelPackageCommandOutput extends UpdateModelPackageOutpu * ], * }, * ], + * InferenceSpecification: { // InferenceSpecification + * Containers: [ // required + * { + * ContainerHostname: "STRING_VALUE", + * Image: "STRING_VALUE", // required + * ImageDigest: "STRING_VALUE", + * ModelDataUrl: "STRING_VALUE", + * ModelDataSource: { + * S3DataSource: { + * S3Uri: "STRING_VALUE", // required + * S3DataType: "S3Prefix" || "S3Object", // required + * CompressionType: "None" || "Gzip", // required + * ModelAccessConfig: { + * AcceptEula: true || false, // required + * }, + * }, + * }, + * ProductId: "STRING_VALUE", + * Environment: { + * "": "STRING_VALUE", + * }, + * ModelInput: { + * DataInputConfig: "STRING_VALUE", // required + * }, + * Framework: "STRING_VALUE", + * FrameworkVersion: "STRING_VALUE", + * NearestModelName: "STRING_VALUE", + * AdditionalS3DataSource: { + * S3DataType: "S3Object" || "S3Prefix", // required + * S3Uri: "STRING_VALUE", // required + * CompressionType: "None" || "Gzip", + * }, + * }, + * ], + * SupportedTransformInstanceTypes: [ + * "ml.m4.xlarge" || "ml.m4.2xlarge" || "ml.m4.4xlarge" || "ml.m4.10xlarge" || "ml.m4.16xlarge" || "ml.c4.xlarge" || "ml.c4.2xlarge" || "ml.c4.4xlarge" || "ml.c4.8xlarge" || "ml.p2.xlarge" || "ml.p2.8xlarge" || "ml.p2.16xlarge" || "ml.p3.2xlarge" || "ml.p3.8xlarge" || "ml.p3.16xlarge" || "ml.c5.xlarge" || "ml.c5.2xlarge" || "ml.c5.4xlarge" || "ml.c5.9xlarge" || "ml.c5.18xlarge" || "ml.m5.large" || "ml.m5.xlarge" || "ml.m5.2xlarge" || "ml.m5.4xlarge" || "ml.m5.12xlarge" || "ml.m5.24xlarge" || "ml.g4dn.xlarge" || "ml.g4dn.2xlarge" || "ml.g4dn.4xlarge" || "ml.g4dn.8xlarge" || "ml.g4dn.12xlarge" || "ml.g4dn.16xlarge", + * ], + * SupportedRealtimeInferenceInstanceTypes: [ + * "ml.t2.medium" || "ml.t2.large" || "ml.t2.xlarge" || "ml.t2.2xlarge" || "ml.m4.xlarge" || "ml.m4.2xlarge" || "ml.m4.4xlarge" || "ml.m4.10xlarge" || "ml.m4.16xlarge" || "ml.m5.large" || "ml.m5.xlarge" || "ml.m5.2xlarge" || "ml.m5.4xlarge" || "ml.m5.12xlarge" || "ml.m5.24xlarge" || "ml.m5d.large" || "ml.m5d.xlarge" || "ml.m5d.2xlarge" || "ml.m5d.4xlarge" || "ml.m5d.12xlarge" || "ml.m5d.24xlarge" || "ml.c4.large" || "ml.c4.xlarge" || "ml.c4.2xlarge" || "ml.c4.4xlarge" || "ml.c4.8xlarge" || "ml.p2.xlarge" || "ml.p2.8xlarge" || "ml.p2.16xlarge" || "ml.p3.2xlarge" || "ml.p3.8xlarge" || "ml.p3.16xlarge" || "ml.c5.large" || "ml.c5.xlarge" || "ml.c5.2xlarge" || "ml.c5.4xlarge" || "ml.c5.9xlarge" || "ml.c5.18xlarge" || "ml.c5d.large" || "ml.c5d.xlarge" || "ml.c5d.2xlarge" || "ml.c5d.4xlarge" || "ml.c5d.9xlarge" || "ml.c5d.18xlarge" || "ml.g4dn.xlarge" || "ml.g4dn.2xlarge" || "ml.g4dn.4xlarge" || "ml.g4dn.8xlarge" || "ml.g4dn.12xlarge" || "ml.g4dn.16xlarge" || "ml.r5.large" || "ml.r5.xlarge" || "ml.r5.2xlarge" || "ml.r5.4xlarge" || "ml.r5.12xlarge" || "ml.r5.24xlarge" || "ml.r5d.large" || "ml.r5d.xlarge" || "ml.r5d.2xlarge" || "ml.r5d.4xlarge" || "ml.r5d.12xlarge" || "ml.r5d.24xlarge" || "ml.inf1.xlarge" || "ml.inf1.2xlarge" || "ml.inf1.6xlarge" || "ml.inf1.24xlarge" || "ml.dl1.24xlarge" || "ml.c6i.large" || "ml.c6i.xlarge" || "ml.c6i.2xlarge" || "ml.c6i.4xlarge" || "ml.c6i.8xlarge" || "ml.c6i.12xlarge" || "ml.c6i.16xlarge" || "ml.c6i.24xlarge" || "ml.c6i.32xlarge" || "ml.g5.xlarge" || "ml.g5.2xlarge" || "ml.g5.4xlarge" || "ml.g5.8xlarge" || "ml.g5.12xlarge" || "ml.g5.16xlarge" || "ml.g5.24xlarge" || "ml.g5.48xlarge" || "ml.p4d.24xlarge" || "ml.c7g.large" || "ml.c7g.xlarge" || "ml.c7g.2xlarge" || "ml.c7g.4xlarge" || "ml.c7g.8xlarge" || "ml.c7g.12xlarge" || "ml.c7g.16xlarge" || "ml.m6g.large" || "ml.m6g.xlarge" || "ml.m6g.2xlarge" || "ml.m6g.4xlarge" || "ml.m6g.8xlarge" || "ml.m6g.12xlarge" || "ml.m6g.16xlarge" || "ml.m6gd.large" || "ml.m6gd.xlarge" || "ml.m6gd.2xlarge" || "ml.m6gd.4xlarge" || "ml.m6gd.8xlarge" || "ml.m6gd.12xlarge" || "ml.m6gd.16xlarge" || "ml.c6g.large" || "ml.c6g.xlarge" || "ml.c6g.2xlarge" || "ml.c6g.4xlarge" || "ml.c6g.8xlarge" || "ml.c6g.12xlarge" || "ml.c6g.16xlarge" || "ml.c6gd.large" || "ml.c6gd.xlarge" || "ml.c6gd.2xlarge" || "ml.c6gd.4xlarge" || "ml.c6gd.8xlarge" || "ml.c6gd.12xlarge" || "ml.c6gd.16xlarge" || "ml.c6gn.large" || "ml.c6gn.xlarge" || "ml.c6gn.2xlarge" || "ml.c6gn.4xlarge" || "ml.c6gn.8xlarge" || "ml.c6gn.12xlarge" || "ml.c6gn.16xlarge" || "ml.r6g.large" || "ml.r6g.xlarge" || "ml.r6g.2xlarge" || "ml.r6g.4xlarge" || "ml.r6g.8xlarge" || "ml.r6g.12xlarge" || "ml.r6g.16xlarge" || "ml.r6gd.large" || "ml.r6gd.xlarge" || "ml.r6gd.2xlarge" || "ml.r6gd.4xlarge" || "ml.r6gd.8xlarge" || "ml.r6gd.12xlarge" || "ml.r6gd.16xlarge" || "ml.p4de.24xlarge" || "ml.trn1.2xlarge" || "ml.trn1.32xlarge" || "ml.trn1n.32xlarge" || "ml.inf2.xlarge" || "ml.inf2.8xlarge" || "ml.inf2.24xlarge" || "ml.inf2.48xlarge" || "ml.p5.48xlarge" || "ml.m7i.large" || "ml.m7i.xlarge" || "ml.m7i.2xlarge" || "ml.m7i.4xlarge" || "ml.m7i.8xlarge" || "ml.m7i.12xlarge" || "ml.m7i.16xlarge" || "ml.m7i.24xlarge" || "ml.m7i.48xlarge" || "ml.c7i.large" || "ml.c7i.xlarge" || "ml.c7i.2xlarge" || "ml.c7i.4xlarge" || "ml.c7i.8xlarge" || "ml.c7i.12xlarge" || "ml.c7i.16xlarge" || "ml.c7i.24xlarge" || "ml.c7i.48xlarge" || "ml.r7i.large" || "ml.r7i.xlarge" || "ml.r7i.2xlarge" || "ml.r7i.4xlarge" || "ml.r7i.8xlarge" || "ml.r7i.12xlarge" || "ml.r7i.16xlarge" || "ml.r7i.24xlarge" || "ml.r7i.48xlarge", + * ], + * SupportedContentTypes: [ + * "STRING_VALUE", + * ], + * SupportedResponseMIMETypes: [ + * "STRING_VALUE", + * ], + * }, + * SourceUri: "STRING_VALUE", * }; * const command = new UpdateModelPackageCommand(input); * const response = await client.send(command); diff --git a/clients/client-sagemaker/src/models/models_0.ts b/clients/client-sagemaker/src/models/models_0.ts index 67aa4c6329a2..b30b36752b63 100644 --- a/clients/client-sagemaker/src/models/models_0.ts +++ b/clients/client-sagemaker/src/models/models_0.ts @@ -275,6 +275,180 @@ export interface AdditionalS3DataSource { CompressionType?: CompressionType; } +/** + * @public + * @enum + */ +export const ModelCompressionType = { + Gzip: "Gzip", + None: "None", +} as const; + +/** + * @public + */ +export type ModelCompressionType = (typeof ModelCompressionType)[keyof typeof ModelCompressionType]; + +/** + * @public + *

The access configuration file to control access to the ML model. You can explicitly accept the model + * end-user license agreement (EULA) within the ModelAccessConfig.

+ * + */ +export interface ModelAccessConfig { + /** + * @public + *

Specifies agreement to the model end-user license agreement (EULA). The + * AcceptEula value must be explicitly defined as True in order + * to accept the EULA that this model requires. You are responsible for reviewing and + * complying with any applicable license terms and making sure they are acceptable for your + * use case before downloading or using a model.

+ */ + AcceptEula: boolean | undefined; +} + +/** + * @public + * @enum + */ +export const S3ModelDataType = { + S3Object: "S3Object", + S3Prefix: "S3Prefix", +} as const; + +/** + * @public + */ +export type S3ModelDataType = (typeof S3ModelDataType)[keyof typeof S3ModelDataType]; + +/** + * @public + *

Specifies the S3 location of ML model data to deploy.

+ */ +export interface S3ModelDataSource { + /** + * @public + *

Specifies the S3 path of ML model data to deploy.

+ */ + S3Uri: string | undefined; + + /** + * @public + *

Specifies the type of ML model data to deploy.

+ *

If you choose S3Prefix, S3Uri identifies a key name prefix. + * SageMaker uses all objects that match the specified key name prefix as part of the ML model + * data to deploy. A valid key name prefix identified by S3Uri always ends + * with a forward slash (/).

+ *

If you choose S3Object, S3Uri identifies an object that is + * the ML model data to deploy.

+ */ + S3DataType: S3ModelDataType | undefined; + + /** + * @public + *

Specifies how the ML model data is prepared.

+ *

If you choose Gzip and choose S3Object as the value of + * S3DataType, S3Uri identifies an object that is a + * gzip-compressed TAR archive. SageMaker will attempt to decompress and untar the object during + * model deployment.

+ *

If you choose None and chooose S3Object as the value of + * S3DataType, S3Uri identifies an object that represents an + * uncompressed ML model to deploy.

+ *

If you choose None and choose S3Prefix as the value of + * S3DataType, S3Uri identifies a key name prefix, under + * which all objects represents the uncompressed ML model to deploy.

+ *

If you choose None, then SageMaker will follow rules below when creating model data files + * under /opt/ml/model directory for use by your inference code:

+ *
    + *
  • + *

    If you choose S3Object as the value of S3DataType, + * then SageMaker will split the key of the S3 object referenced by S3Uri + * by slash (/), and use the last part as the filename of the file holding the + * content of the S3 object.

    + *
  • + *
  • + *

    If you choose S3Prefix as the value of S3DataType, + * then for each S3 object under the key name pefix referenced by + * S3Uri, SageMaker will trim its key by the prefix, and use the + * remainder as the path (relative to /opt/ml/model) of the file + * holding the content of the S3 object. SageMaker will split the remainder by slash + * (/), using intermediate parts as directory names and the last part as filename + * of the file holding the content of the S3 object.

    + *
  • + *
  • + *

    Do not use any of the following as file names or directory names:

    + *
      + *
    • + *

      An empty or blank string

      + *
    • + *
    • + *

      A string which contains null bytes

      + *
    • + *
    • + *

      A string longer than 255 bytes

      + *
    • + *
    • + *

      A single dot (.)

      + *
    • + *
    • + *

      A double dot (..)

      + *
    • + *
    + *
  • + *
  • + *

    Ambiguous file names will result in model deployment failure. For example, if + * your uncompressed ML model consists of two S3 objects + * s3://mybucket/model/weights and + * s3://mybucket/model/weights/part1 and you specify + * s3://mybucket/model/ as the value of S3Uri and + * S3Prefix as the value of S3DataType, then it will + * result in name clash between /opt/ml/model/weights (a regular file) + * and /opt/ml/model/weights/ (a directory).

    + *
  • + *
  • + *

    Do not organize the model artifacts in S3 console using + * folders. When you create a folder in S3 console, S3 creates a 0-byte + * object with a key set to the folder name you provide. They key of the 0-byte + * object ends with a slash (/) which violates SageMaker restrictions on model artifact + * file names, leading to model deployment failure.

    + *
  • + *
+ */ + CompressionType: ModelCompressionType | undefined; + + /** + * @public + *

Specifies the access configuration file for the ML model. You can explicitly accept the + * model end-user license agreement (EULA) within the ModelAccessConfig. You are + * responsible for reviewing and complying with any applicable license terms and making sure + * they are acceptable for your use case before downloading or using a model.

+ */ + ModelAccessConfig?: ModelAccessConfig; +} + +/** + * @public + *

Specifies the location of ML model data to deploy. If specified, you must specify one + * and only one of the available data sources.

+ */ +export interface ModelDataSource { + /** + * @public + *

Specifies the S3 location of ML model data to deploy.

+ */ + S3DataSource?: S3ModelDataSource; +} + /** * @public *

Input object for the model.

@@ -328,6 +502,12 @@ export interface ModelPackageContainerDefinition { */ ModelDataUrl?: string; + /** + * @public + *

Specifies the location of ML model data to deploy during endpoint creation.

+ */ + ModelDataSource?: ModelDataSource; + /** * @public *

The Amazon Web Services Marketplace product ID of the model package.

@@ -4119,7 +4299,7 @@ export interface FileSystemConfig { /** * @public - *

The configuration for the file system and kernels in a SageMaker image running as a JupyterLab app.

+ *

The configuration for the file system and kernels in a SageMaker image running as a JupyterLab app. The FileSystemConfig object is not supported.

*/ export interface JupyterLabAppImageConfig { /** @@ -5766,21 +5946,19 @@ export interface AutoMLJobObjective { *

List of available metrics:

*
    *
  • - *

    Regression: InferenceLatency, MAE, + *

    Regression: MAE, * MSE, R2, RMSE *

    *
  • *
  • *

    Binary classification: Accuracy, AUC, * BalancedAccuracy, F1, - * InferenceLatency, LogLoss, * Precision, Recall *

    *
  • *
  • *

    Multiclass classification: Accuracy, * BalancedAccuracy, F1macro, - * InferenceLatency, LogLoss, * PrecisionMacro, RecallMacro *

    *
  • @@ -6209,34 +6387,6 @@ export interface TextClassificationJobConfig { TargetLabelColumn: string | undefined; } -/** - * @public - *

    The access configuration file to control access to the ML model. You can explicitly accept the model - * end-user license agreement (EULA) within the ModelAccessConfig.

    - * - */ -export interface ModelAccessConfig { - /** - * @public - *

    Specifies agreement to the model end-user license agreement (EULA). The - * AcceptEula value must be explicitly defined as True in order - * to accept the EULA that this model requires. You are responsible for reviewing and - * complying with any applicable license terms and making sure they are acceptable for your - * use case before downloading or using a model.

    - */ - AcceptEula: boolean | undefined; -} - /** * @public *

    The collection of settings used by an AutoML job V2 for the text generation problem @@ -9468,152 +9618,6 @@ export const ContainerMode = { */ export type ContainerMode = (typeof ContainerMode)[keyof typeof ContainerMode]; -/** - * @public - * @enum - */ -export const ModelCompressionType = { - Gzip: "Gzip", - None: "None", -} as const; - -/** - * @public - */ -export type ModelCompressionType = (typeof ModelCompressionType)[keyof typeof ModelCompressionType]; - -/** - * @public - * @enum - */ -export const S3ModelDataType = { - S3Object: "S3Object", - S3Prefix: "S3Prefix", -} as const; - -/** - * @public - */ -export type S3ModelDataType = (typeof S3ModelDataType)[keyof typeof S3ModelDataType]; - -/** - * @public - *

    Specifies the S3 location of ML model data to deploy.

    - */ -export interface S3ModelDataSource { - /** - * @public - *

    Specifies the S3 path of ML model data to deploy.

    - */ - S3Uri: string | undefined; - - /** - * @public - *

    Specifies the type of ML model data to deploy.

    - *

    If you choose S3Prefix, S3Uri identifies a key name prefix. - * SageMaker uses all objects that match the specified key name prefix as part of the ML model - * data to deploy. A valid key name prefix identified by S3Uri always ends - * with a forward slash (/).

    - *

    If you choose S3Object, S3Uri identifies an object that is - * the ML model data to deploy.

    - */ - S3DataType: S3ModelDataType | undefined; - - /** - * @public - *

    Specifies how the ML model data is prepared.

    - *

    If you choose Gzip and choose S3Object as the value of - * S3DataType, S3Uri identifies an object that is a - * gzip-compressed TAR archive. SageMaker will attempt to decompress and untar the object during - * model deployment.

    - *

    If you choose None and chooose S3Object as the value of - * S3DataType, S3Uri identifies an object that represents an - * uncompressed ML model to deploy.

    - *

    If you choose None and choose S3Prefix as the value of - * S3DataType, S3Uri identifies a key name prefix, under - * which all objects represents the uncompressed ML model to deploy.

    - *

    If you choose None, then SageMaker will follow rules below when creating model data files - * under /opt/ml/model directory for use by your inference code:

    - *
      - *
    • - *

      If you choose S3Object as the value of S3DataType, - * then SageMaker will split the key of the S3 object referenced by S3Uri - * by slash (/), and use the last part as the filename of the file holding the - * content of the S3 object.

      - *
    • - *
    • - *

      If you choose S3Prefix as the value of S3DataType, - * then for each S3 object under the key name pefix referenced by - * S3Uri, SageMaker will trim its key by the prefix, and use the - * remainder as the path (relative to /opt/ml/model) of the file - * holding the content of the S3 object. SageMaker will split the remainder by slash - * (/), using intermediate parts as directory names and the last part as filename - * of the file holding the content of the S3 object.

      - *
    • - *
    • - *

      Do not use any of the following as file names or directory names:

      - *
        - *
      • - *

        An empty or blank string

        - *
      • - *
      • - *

        A string which contains null bytes

        - *
      • - *
      • - *

        A string longer than 255 bytes

        - *
      • - *
      • - *

        A single dot (.)

        - *
      • - *
      • - *

        A double dot (..)

        - *
      • - *
      - *
    • - *
    • - *

      Ambiguous file names will result in model deployment failure. For example, if - * your uncompressed ML model consists of two S3 objects - * s3://mybucket/model/weights and - * s3://mybucket/model/weights/part1 and you specify - * s3://mybucket/model/ as the value of S3Uri and - * S3Prefix as the value of S3DataType, then it will - * result in name clash between /opt/ml/model/weights (a regular file) - * and /opt/ml/model/weights/ (a directory).

      - *
    • - *
    • - *

      Do not organize the model artifacts in S3 console using - * folders. When you create a folder in S3 console, S3 creates a 0-byte - * object with a key set to the folder name you provide. They key of the 0-byte - * object ends with a slash (/) which violates SageMaker restrictions on model artifact - * file names, leading to model deployment failure.

      - *
    • - *
    - */ - CompressionType: ModelCompressionType | undefined; - - /** - * @public - *

    Specifies the access configuration file for the ML model. You can explicitly accept the - * model end-user license agreement (EULA) within the ModelAccessConfig. You are - * responsible for reviewing and complying with any applicable license terms and making sure - * they are acceptable for your use case before downloading or using a model.

    - */ - ModelAccessConfig?: ModelAccessConfig; -} - -/** - * @public - *

    Specifies the location of ML model data to deploy. If specified, you must specify one - * and only one of the available data sources.

    - */ -export interface ModelDataSource { - /** - * @public - *

    Specifies the S3 location of ML model data to deploy.

    - */ - S3DataSource?: S3ModelDataSource; -} - /** * @public * @enum diff --git a/clients/client-sagemaker/src/models/models_1.ts b/clients/client-sagemaker/src/models/models_1.ts index c203f57a0ffc..0c0d802dd234 100644 --- a/clients/client-sagemaker/src/models/models_1.ts +++ b/clients/client-sagemaker/src/models/models_1.ts @@ -46,6 +46,7 @@ import { MetricDefinition, MetricsSource, ModelApprovalStatus, + ModelDataSource, NeoVpcConfig, OutputConfig, OutputDataConfig, @@ -9428,7 +9429,7 @@ export interface ModelMetrics { /** * @public - *

    Metrics that measure bais in a model.

    + *

    Metrics that measure bias in a model.

    */ Bias?: Bias; @@ -9471,6 +9472,12 @@ export interface SourceAlgorithm { */ ModelDataUrl?: string; + /** + * @public + *

    Specifies the location of ML model data to deploy during endpoint creation.

    + */ + ModelDataSource?: ModelDataSource; + /** * @public *

    The name of an algorithm that was used to create the model package. The algorithm must @@ -9561,8 +9568,8 @@ export interface CreateModelPackageInput { /** * @public - *

    Specifies details about inference jobs that can be run with models based on this model - * package, including the following:

    + *

    Specifies details about inference jobs that you can run with models based on this model + * package, including the following information:

    *