From 9330d732705463267f709e13a021b9e4e90ae832 Mon Sep 17 00:00:00 2001 From: awstools Date: Tue, 23 May 2023 18:30:36 +0000 Subject: [PATCH] feat(client-sagemaker): Added ModelNameEquals, ModelPackageVersionArnEquals in request and ModelName, SamplePayloadUrl, ModelPackageVersionArn in response of ListInferenceRecommendationsJobs API. Added Invocation timestamps in response of DescribeInferenceRecommendationsJob API & ListInferenceRecommendationsJobSteps API. --- ...cribeInferenceRecommendationsJobCommand.ts | 2 + ...InferenceRecommendationsJobStepsCommand.ts | 2 + ...ListInferenceRecommendationsJobsCommand.ts | 5 ++ .../client-sagemaker/src/models/models_0.ts | 2 + .../client-sagemaker/src/models/models_1.ts | 3 +- .../client-sagemaker/src/models/models_2.ts | 36 ++++++++++ .../client-sagemaker/src/models/models_3.ts | 11 +++ .../src/protocols/Aws_json1_1.ts | 9 +++ codegen/sdk-codegen/aws-models/sagemaker.json | 70 +++++++++++++++++-- 9 files changed, 134 insertions(+), 6 deletions(-) diff --git a/clients/client-sagemaker/src/commands/DescribeInferenceRecommendationsJobCommand.ts b/clients/client-sagemaker/src/commands/DescribeInferenceRecommendationsJobCommand.ts index b9da48566a9b..3f1c28f7554e 100644 --- a/clients/client-sagemaker/src/commands/DescribeInferenceRecommendationsJobCommand.ts +++ b/clients/client-sagemaker/src/commands/DescribeInferenceRecommendationsJobCommand.ts @@ -171,6 +171,8 @@ export interface DescribeInferenceRecommendationsJobCommandOutput * // CompilationJobName: "STRING_VALUE", * // }, * // RecommendationId: "STRING_VALUE", + * // InvocationEndTime: new Date("TIMESTAMP"), + * // InvocationStartTime: new Date("TIMESTAMP"), * // }, * // ], * // EndpointPerformances: [ // EndpointPerformances diff --git a/clients/client-sagemaker/src/commands/ListInferenceRecommendationsJobStepsCommand.ts b/clients/client-sagemaker/src/commands/ListInferenceRecommendationsJobStepsCommand.ts index 0c4450b05315..9ffb43279dc6 100644 --- a/clients/client-sagemaker/src/commands/ListInferenceRecommendationsJobStepsCommand.ts +++ b/clients/client-sagemaker/src/commands/ListInferenceRecommendationsJobStepsCommand.ts @@ -98,6 +98,8 @@ export interface ListInferenceRecommendationsJobStepsCommandOutput * // MaxInvocations: Number("int"), // required * // ModelLatency: Number("int"), // required * // }, + * // InvocationEndTime: new Date("TIMESTAMP"), + * // InvocationStartTime: new Date("TIMESTAMP"), * // }, * // }, * // ], diff --git a/clients/client-sagemaker/src/commands/ListInferenceRecommendationsJobsCommand.ts b/clients/client-sagemaker/src/commands/ListInferenceRecommendationsJobsCommand.ts index dd02b169a730..b67f430a9bc9 100644 --- a/clients/client-sagemaker/src/commands/ListInferenceRecommendationsJobsCommand.ts +++ b/clients/client-sagemaker/src/commands/ListInferenceRecommendationsJobsCommand.ts @@ -59,6 +59,8 @@ export interface ListInferenceRecommendationsJobsCommandOutput * SortOrder: "Ascending" || "Descending", * NextToken: "STRING_VALUE", * MaxResults: Number("int"), + * ModelNameEquals: "STRING_VALUE", + * ModelPackageVersionArnEquals: "STRING_VALUE", * }; * const command = new ListInferenceRecommendationsJobsCommand(input); * const response = await client.send(command); @@ -75,6 +77,9 @@ export interface ListInferenceRecommendationsJobsCommandOutput * // RoleArn: "STRING_VALUE", // required * // LastModifiedTime: new Date("TIMESTAMP"), // required * // FailureReason: "STRING_VALUE", + * // ModelName: "STRING_VALUE", + * // SamplePayloadUrl: "STRING_VALUE", + * // ModelPackageVersionArn: "STRING_VALUE", * // }, * // ], * // NextToken: "STRING_VALUE", diff --git a/clients/client-sagemaker/src/models/models_0.ts b/clients/client-sagemaker/src/models/models_0.ts index 3435472023e7..dea398a76b8a 100644 --- a/clients/client-sagemaker/src/models/models_0.ts +++ b/clients/client-sagemaker/src/models/models_0.ts @@ -1058,6 +1058,7 @@ export type S3DataType = (typeof S3DataType)[keyof typeof S3DataType]; /** * @public *

Describes the S3 data source.

+ *

Your input bucket must be in the same Amazon Web Services region as your training job.

*/ export interface S3DataSource { /** @@ -1131,6 +1132,7 @@ export interface S3DataSource { * your behalf.

* * + *

Your input bucket must be located in same Amazon Web Services region as your training job.

*/ S3Uri: string | undefined; diff --git a/clients/client-sagemaker/src/models/models_1.ts b/clients/client-sagemaker/src/models/models_1.ts index 3b135201e82d..98b30dbe943a 100644 --- a/clients/client-sagemaker/src/models/models_1.ts +++ b/clients/client-sagemaker/src/models/models_1.ts @@ -6662,7 +6662,7 @@ export interface SourceAlgorithm { * This path must point to a single gzip compressed tar archive * (.tar.gz suffix).

* - *

The model artifacts must be in an S3 bucket that is in the same region as the + *

The model artifacts must be in an S3 bucket that is in the same Amazon Web Services region as the * algorithm.

*
*/ @@ -8776,6 +8776,7 @@ export interface CreateTrainingJobRequest { * data files from an S3 bucket to a local directory in the Docker container, or makes it * available as input streams. For example, if you specify an EFS location, input data * files are available as input streams. They do not need to be downloaded.

+ *

Your input must be in the same Amazon Web Services region as your training job.

*/ InputDataConfig?: Channel[]; diff --git a/clients/client-sagemaker/src/models/models_2.ts b/clients/client-sagemaker/src/models/models_2.ts index e5253ff91d57..b0541e0aa37c 100644 --- a/clients/client-sagemaker/src/models/models_2.ts +++ b/clients/client-sagemaker/src/models/models_2.ts @@ -4236,6 +4236,16 @@ export interface InferenceRecommendation { *

The recommendation ID which uniquely identifies each recommendation.

*/ RecommendationId?: string; + + /** + *

A timestamp that shows when the benchmark completed.

+ */ + InvocationEndTime?: Date; + + /** + *

A timestamp that shows when the benchmark started.

+ */ + InvocationStartTime?: Date; } /** @@ -10524,6 +10534,22 @@ export interface InferenceRecommendationsJob { *

If the job fails, provides information why the job failed.

*/ FailureReason?: string; + + /** + *

The name of the created model.

+ */ + ModelName?: string; + + /** + *

The Amazon Simple Storage Service (Amazon S3) path where the sample payload is stored. + * This path must point to a single gzip compressed tar archive (.tar.gz suffix).

+ */ + SamplePayloadUrl?: string; + + /** + *

The Amazon Resource Name (ARN) of a versioned model package.

+ */ + ModelPackageVersionArn?: string; } /** @@ -10555,6 +10581,16 @@ export interface RecommendationJobInferenceBenchmark { *

The metrics for an existing endpoint compared in an Inference Recommender job.

*/ EndpointMetrics?: InferenceMetrics; + + /** + *

A timestamp that shows when the benchmark completed.

+ */ + InvocationEndTime?: Date; + + /** + *

A timestamp that shows when the benchmark started.

+ */ + InvocationStartTime?: Date; } /** diff --git a/clients/client-sagemaker/src/models/models_3.ts b/clients/client-sagemaker/src/models/models_3.ts index 173804db2ecb..c42374853fdb 100644 --- a/clients/client-sagemaker/src/models/models_3.ts +++ b/clients/client-sagemaker/src/models/models_3.ts @@ -2670,6 +2670,16 @@ export interface ListInferenceRecommendationsJobsRequest { *

The maximum number of recommendations to return in the response.

*/ MaxResults?: number; + + /** + *

A filter that returns only jobs that were created for this model.

+ */ + ModelNameEquals?: string; + + /** + *

A filter that returns only jobs that were created for this versioned model package.

+ */ + ModelPackageVersionArnEquals?: string; } /** @@ -8782,6 +8792,7 @@ export interface TrainingJob { /** *

An array of Channel objects that describes each data input * channel.

+ *

Your input must be in the same Amazon Web Services region as your training job.

*/ InputDataConfig?: Channel[]; diff --git a/clients/client-sagemaker/src/protocols/Aws_json1_1.ts b/clients/client-sagemaker/src/protocols/Aws_json1_1.ts index 47bfdde0187b..60ce30711dec 100644 --- a/clients/client-sagemaker/src/protocols/Aws_json1_1.ts +++ b/clients/client-sagemaker/src/protocols/Aws_json1_1.ts @@ -20631,6 +20631,8 @@ const se_ListInferenceRecommendationsJobsRequest = ( LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), MaxResults: [], + ModelNameEquals: [], + ModelPackageVersionArnEquals: [], NameContains: [], NextToken: [], SortBy: [], @@ -25028,6 +25030,8 @@ const de_InferenceExperimentSummary = (output: any, context: __SerdeContext): In const de_InferenceRecommendation = (output: any, context: __SerdeContext): InferenceRecommendation => { return take(output, { EndpointConfiguration: _json, + InvocationEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InvocationStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), Metrics: (_: any) => de_RecommendationMetrics(_, context), ModelConfiguration: _json, RecommendationId: __expectString, @@ -25059,7 +25063,10 @@ const de_InferenceRecommendationsJob = (output: any, context: __SerdeContext): I JobName: __expectString, JobType: __expectString, LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelName: __expectString, + ModelPackageVersionArn: __expectString, RoleArn: __expectString, + SamplePayloadUrl: __expectString, Status: __expectString, }) as any; }; @@ -27326,6 +27333,8 @@ const de_RecommendationJobInferenceBenchmark = ( EndpointConfiguration: _json, EndpointMetrics: _json, FailureReason: __expectString, + InvocationEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InvocationStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), Metrics: (_: any) => de_RecommendationMetrics(_, context), ModelConfiguration: _json, }) as any; diff --git a/codegen/sdk-codegen/aws-models/sagemaker.json b/codegen/sdk-codegen/aws-models/sagemaker.json index dddb90520ecb..6bfd40f61d07 100644 --- a/codegen/sdk-codegen/aws-models/sagemaker.json +++ b/codegen/sdk-codegen/aws-models/sagemaker.json @@ -10239,7 +10239,7 @@ "InputDataConfig": { "target": "com.amazonaws.sagemaker#InputDataConfig", "traits": { - "smithy.api#documentation": "

An array of Channel objects. Each channel is a named input source.\n InputDataConfig describes the input data and its location.

\n

Algorithms can accept input data from one or more channels. For example, an\n algorithm might have two channels of input data, training_data and\n validation_data. The configuration for each channel provides the S3,\n EFS, or FSx location where the input data is stored. It also provides information about\n the stored data: the MIME type, compression method, and whether the data is wrapped in\n RecordIO format.

\n

Depending on the input mode that the algorithm supports, SageMaker either copies input\n data files from an S3 bucket to a local directory in the Docker container, or makes it\n available as input streams. For example, if you specify an EFS location, input data\n files are available as input streams. They do not need to be downloaded.

" + "smithy.api#documentation": "

An array of Channel objects. Each channel is a named input source.\n InputDataConfig describes the input data and its location.

\n

Algorithms can accept input data from one or more channels. For example, an\n algorithm might have two channels of input data, training_data and\n validation_data. The configuration for each channel provides the S3,\n EFS, or FSx location where the input data is stored. It also provides information about\n the stored data: the MIME type, compression method, and whether the data is wrapped in\n RecordIO format.

\n

Depending on the input mode that the algorithm supports, SageMaker either copies input\n data files from an S3 bucket to a local directory in the Docker container, or makes it\n available as input streams. For example, if you specify an EFS location, input data\n files are available as input streams. They do not need to be downloaded.

\n

Your input must be in the same Amazon Web Services region as your training job.

" } }, "OutputDataConfig": { @@ -27436,6 +27436,18 @@ "traits": { "smithy.api#documentation": "

The recommendation ID which uniquely identifies each recommendation.

" } + }, + "InvocationEndTime": { + "target": "com.amazonaws.sagemaker#InvocationEndTime", + "traits": { + "smithy.api#documentation": "

A timestamp that shows when the benchmark completed.

" + } + }, + "InvocationStartTime": { + "target": "com.amazonaws.sagemaker#InvocationStartTime", + "traits": { + "smithy.api#documentation": "

A timestamp that shows when the benchmark started.

" + } } }, "traits": { @@ -27524,6 +27536,24 @@ "traits": { "smithy.api#documentation": "

If the job fails, provides information why the job failed.

" } + }, + "ModelName": { + "target": "com.amazonaws.sagemaker#ModelName", + "traits": { + "smithy.api#documentation": "

The name of the created model.

" + } + }, + "SamplePayloadUrl": { + "target": "com.amazonaws.sagemaker#S3Uri", + "traits": { + "smithy.api#documentation": "

The Amazon Simple Storage Service (Amazon S3) path where the sample payload is stored.\n This path must point to a single gzip compressed tar archive (.tar.gz suffix).

" + } + }, + "ModelPackageVersionArn": { + "target": "com.amazonaws.sagemaker#ModelPackageArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of a versioned model package.

" + } } }, "traits": { @@ -28298,6 +28328,12 @@ "smithy.api#default": 0 } }, + "com.amazonaws.sagemaker#InvocationEndTime": { + "type": "timestamp" + }, + "com.amazonaws.sagemaker#InvocationStartTime": { + "type": "timestamp" + }, "com.amazonaws.sagemaker#InvocationsMaxRetries": { "type": "integer", "traits": { @@ -32553,6 +32589,18 @@ "traits": { "smithy.api#documentation": "

The maximum number of recommendations to return in the response.

" } + }, + "ModelNameEquals": { + "target": "com.amazonaws.sagemaker#ModelName", + "traits": { + "smithy.api#documentation": "

A filter that returns only jobs that were created for this model.

" + } + }, + "ModelPackageVersionArnEquals": { + "target": "com.amazonaws.sagemaker#ModelPackageArn", + "traits": { + "smithy.api#documentation": "

A filter that returns only jobs that were created for this versioned model package.

" + } } }, "traits": { @@ -45967,6 +46015,18 @@ }, "EndpointMetrics": { "target": "com.amazonaws.sagemaker#InferenceMetrics" + }, + "InvocationEndTime": { + "target": "com.amazonaws.sagemaker#InvocationEndTime", + "traits": { + "smithy.api#documentation": "

A timestamp that shows when the benchmark completed.

" + } + }, + "InvocationStartTime": { + "target": "com.amazonaws.sagemaker#InvocationStartTime", + "traits": { + "smithy.api#documentation": "

A timestamp that shows when the benchmark started.

" + } } }, "traits": { @@ -47320,7 +47380,7 @@ "S3Uri": { "target": "com.amazonaws.sagemaker#S3Uri", "traits": { - "smithy.api#documentation": "

Depending on the value specified for the S3DataType, identifies either\n a key name prefix or a manifest. For example:

\n ", + "smithy.api#documentation": "

Depending on the value specified for the S3DataType, identifies either\n a key name prefix or a manifest. For example:

\n \n

Your input bucket must be located in same Amazon Web Services region as your training job.

", "smithy.api#required": {} } }, @@ -47344,7 +47404,7 @@ } }, "traits": { - "smithy.api#documentation": "

Describes the S3 data source.

" + "smithy.api#documentation": "

Describes the S3 data source.

\n

Your input bucket must be in the same Amazon Web Services region as your training job.

" } }, "com.amazonaws.sagemaker#S3DataType": { @@ -50519,7 +50579,7 @@ "ModelDataUrl": { "target": "com.amazonaws.sagemaker#Url", "traits": { - "smithy.api#documentation": "

The Amazon S3 path where the model artifacts, which result from model training, are stored.\n This path must point to a single gzip compressed tar archive\n (.tar.gz suffix).

\n \n

The model artifacts must be in an S3 bucket that is in the same region as the\n algorithm.

\n
" + "smithy.api#documentation": "

The Amazon S3 path where the model artifacts, which result from model training, are stored.\n This path must point to a single gzip compressed tar archive\n (.tar.gz suffix).

\n \n

The model artifacts must be in an S3 bucket that is in the same Amazon Web Services region as the\n algorithm.

\n
" } }, "AlgorithmName": { @@ -53222,7 +53282,7 @@ "InputDataConfig": { "target": "com.amazonaws.sagemaker#InputDataConfig", "traits": { - "smithy.api#documentation": "

An array of Channel objects that describes each data input\n channel.

" + "smithy.api#documentation": "

An array of Channel objects that describes each data input\n channel.

\n

Your input must be in the same Amazon Web Services region as your training job.

" } }, "OutputDataConfig": {