Skip to content

Commit 34e5ab6

Browse files
author
awstools
committed
feat(client-rekognition): This release introduces support for the automatic scaling of inference units used by Amazon Rekognition Custom Labels models.
1 parent 9f42ace commit 34e5ab6

File tree

5 files changed

+46
-8
lines changed

5 files changed

+46
-8
lines changed

clients/client-rekognition/src/Rekognition.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3056,6 +3056,9 @@ export class Rekognition extends RekognitionClient {
30563056
* <p>You are charged for the amount of time that the model is running. To stop a running
30573057
* model, call <a>StopProjectVersion</a>.</p>
30583058
* </note>
3059+
*
3060+
* <p>For more information, see <i>Running a trained Amazon Rekognition Custom Labels model</i> in the Amazon Rekognition Custom Labels Guide.</p>
3061+
*
30593062
* <p>This operation requires permissions to perform the
30603063
* <code>rekognition:StartProjectVersion</code> action.</p>
30613064
*/

clients/client-rekognition/src/commands/StartProjectVersionCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ export interface StartProjectVersionCommandOutput extends StartProjectVersionRes
3636
* <p>You are charged for the amount of time that the model is running. To stop a running
3737
* model, call <a>StopProjectVersion</a>.</p>
3838
* </note>
39+
*
40+
* <p>For more information, see <i>Running a trained Amazon Rekognition Custom Labels model</i> in the Amazon Rekognition Custom Labels Guide.</p>
41+
*
3942
* <p>This operation requires permissions to perform the
4043
* <code>rekognition:StartProjectVersion</code> action.</p>
4144
* @example

clients/client-rekognition/src/models/models_0.ts

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1829,7 +1829,7 @@ export interface Point {
18291829

18301830
/**
18311831
* <p>Specifies a location within the frame that Rekognition checks for objects of interest such as text, labels, or faces. It uses a <code>BoundingBox</code>
1832-
* or object or <code>Polygon</code> to set a region of the screen.</p>
1832+
* or <code>Polygon</code> to set a region of the screen.</p>
18331833
* <p>A word, face, or label is included in the region if it is more than half in that region. If there is more than
18341834
* one region, the word, face, or label is compared with all regions of the screen. Any object of interest that is more than half in a region
18351835
* is kept in the results.</p>
@@ -1949,7 +1949,7 @@ export interface CreateStreamProcessorRequest {
19491949

19501950
/**
19511951
* <p>
1952-
* Specifies locations in the frames where Amazon Rekognition checks for objects or people. You can specify up to 10 regions of interest. This is an optional parameter for label detection stream processors and should not be used to create a face search stream processor.
1952+
* Specifies locations in the frames where Amazon Rekognition checks for objects or people. You can specify up to 10 regions of interest, and each region has either a polygon or a bounding box. This is an optional parameter for label detection stream processors and should not be used to create a face search stream processor.
19531953
* </p>
19541954
*/
19551955
RegionsOfInterest?: RegionOfInterest[];
@@ -2675,6 +2675,12 @@ export interface ProjectVersionDescription {
26752675
* <p>The identifer for the AWS Key Management Service key (AWS KMS key) that was used to encrypt the model during training. </p>
26762676
*/
26772677
KmsKeyId?: string;
2678+
2679+
/**
2680+
* <p>The maximum number of inference units Amazon Rekognition Custom Labels uses to auto-scale the model.
2681+
* For more information, see <a>StartProjectVersion</a>.</p>
2682+
*/
2683+
MaxInferenceUnits?: number;
26782684
}
26792685

26802686
export interface DescribeProjectVersionsResponse {
@@ -5296,12 +5302,24 @@ export interface StartProjectVersionRequest {
52965302

52975303
/**
52985304
* <p>The minimum number of inference units to use. A single
5299-
* inference unit represents 1 hour of processing and can support up to 5 Transaction Pers Second (TPS).
5300-
* Use a higher number to increase the TPS throughput of your model. You are charged for the number
5305+
* inference unit represents 1 hour of processing. </p>
5306+
*
5307+
* <p>For information about the number
5308+
* of transactions per second (TPS) that an inference unit can support, see
5309+
* <i>Running a trained Amazon Rekognition Custom Labels model</i> in the
5310+
* Amazon Rekognition Custom Labels Guide.
5311+
* </p>
5312+
* <p>Use a higher number to increase the TPS throughput of your model. You are charged for the number
53015313
* of inference units that you use.
53025314
* </p>
53035315
*/
53045316
MinInferenceUnits: number | undefined;
5317+
5318+
/**
5319+
* <p>The maximum number of inference units to use for auto-scaling the model. If you don't
5320+
* specify a value, Amazon Rekognition Custom Labels doesn't auto-scale the model.</p>
5321+
*/
5322+
MaxInferenceUnits?: number;
53055323
}
53065324

53075325
export interface StartProjectVersionResponse {

clients/client-rekognition/src/protocols/Aws_json1_1.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6023,6 +6023,7 @@ const serializeAws_json1_1StartProjectVersionRequest = (
60236023
context: __SerdeContext
60246024
): any => {
60256025
return {
6026+
...(input.MaxInferenceUnits != null && { MaxInferenceUnits: input.MaxInferenceUnits }),
60266027
...(input.MinInferenceUnits != null && { MinInferenceUnits: input.MinInferenceUnits }),
60276028
...(input.ProjectVersionArn != null && { ProjectVersionArn: input.ProjectVersionArn }),
60286029
};
@@ -7840,6 +7841,7 @@ const deserializeAws_json1_1ProjectVersionDescription = (
78407841
output.ManifestSummary != null
78417842
? deserializeAws_json1_1GroundTruthManifest(output.ManifestSummary, context)
78427843
: undefined,
7844+
MaxInferenceUnits: __expectInt32(output.MaxInferenceUnits),
78437845
MinInferenceUnits: __expectInt32(output.MinInferenceUnits),
78447846
OutputConfig:
78457847
output.OutputConfig != null ? deserializeAws_json1_1OutputConfig(output.OutputConfig, context) : undefined,

codegen/sdk-codegen/aws-models/rekognition.json

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,7 @@
11971197
"RegionsOfInterest": {
11981198
"target": "com.amazonaws.rekognition#RegionsOfInterest",
11991199
"traits": {
1200-
"smithy.api#documentation": "<p>\n Specifies locations in the frames where Amazon Rekognition checks for objects or people. You can specify up to 10 regions of interest. This is an optional parameter for label detection stream processors and should not be used to create a face search stream processor.\n </p>"
1200+
"smithy.api#documentation": "<p>\n Specifies locations in the frames where Amazon Rekognition checks for objects or people. You can specify up to 10 regions of interest, and each region has either a polygon or a bounding box. This is an optional parameter for label detection stream processors and should not be used to create a face search stream processor.\n </p>"
12011201
}
12021202
},
12031203
"DataSharingPreference": {
@@ -6507,6 +6507,12 @@
65076507
"traits": {
65086508
"smithy.api#documentation": "<p>The identifer for the AWS Key Management Service key (AWS KMS key) that was used to encrypt the model during training. </p>"
65096509
}
6510+
},
6511+
"MaxInferenceUnits": {
6512+
"target": "com.amazonaws.rekognition#InferenceUnits",
6513+
"traits": {
6514+
"smithy.api#documentation": "<p>The maximum number of inference units Amazon Rekognition Custom Labels uses to auto-scale the model.\n For more information, see <a>StartProjectVersion</a>.</p>"
6515+
}
65106516
}
65116517
},
65126518
"traits": {
@@ -6914,7 +6920,7 @@
69146920
}
69156921
},
69166922
"traits": {
6917-
"smithy.api#documentation": "<p>Specifies a location within the frame that Rekognition checks for objects of interest such as text, labels, or faces. It uses a <code>BoundingBox</code>\n or object or <code>Polygon</code> to set a region of the screen.</p>\n <p>A word, face, or label is included in the region if it is more than half in that region. If there is more than\n one region, the word, face, or label is compared with all regions of the screen. Any object of interest that is more than half in a region\n is kept in the results.</p>"
6923+
"smithy.api#documentation": "<p>Specifies a location within the frame that Rekognition checks for objects of interest such as text, labels, or faces. It uses a <code>BoundingBox</code>\n or <code>Polygon</code> to set a region of the screen.</p>\n <p>A word, face, or label is included in the region if it is more than half in that region. If there is more than\n one region, the word, face, or label is compared with all regions of the screen. Any object of interest that is more than half in a region\n is kept in the results.</p>"
69186924
}
69196925
},
69206926
"com.amazonaws.rekognition#RegionsOfInterest": {
@@ -8290,7 +8296,7 @@
82908296
}
82918297
],
82928298
"traits": {
8293-
"smithy.api#documentation": "<p>Starts the running of the version of a model. Starting a model takes a while\n to complete. To check the current state of the model, use <a>DescribeProjectVersions</a>.</p>\n <p>Once the model is running, you can detect custom labels in new images by calling \n <a>DetectCustomLabels</a>.</p>\n <note>\n <p>You are charged for the amount of time that the model is running. To stop a running\n model, call <a>StopProjectVersion</a>.</p>\n </note>\n <p>This operation requires permissions to perform the \n <code>rekognition:StartProjectVersion</code> action.</p>"
8299+
"smithy.api#documentation": "<p>Starts the running of the version of a model. Starting a model takes a while\n to complete. To check the current state of the model, use <a>DescribeProjectVersions</a>.</p>\n <p>Once the model is running, you can detect custom labels in new images by calling \n <a>DetectCustomLabels</a>.</p>\n <note>\n <p>You are charged for the amount of time that the model is running. To stop a running\n model, call <a>StopProjectVersion</a>.</p>\n </note>\n \n <p>For more information, see <i>Running a trained Amazon Rekognition Custom Labels model</i> in the Amazon Rekognition Custom Labels Guide.</p>\n \n <p>This operation requires permissions to perform the \n <code>rekognition:StartProjectVersion</code> action.</p>"
82948300
}
82958301
},
82968302
"com.amazonaws.rekognition#StartProjectVersionRequest": {
@@ -8306,9 +8312,15 @@
83068312
"MinInferenceUnits": {
83078313
"target": "com.amazonaws.rekognition#InferenceUnits",
83088314
"traits": {
8309-
"smithy.api#documentation": "<p>The minimum number of inference units to use. A single\n inference unit represents 1 hour of processing and can support up to 5 Transaction Pers Second (TPS).\n Use a higher number to increase the TPS throughput of your model. You are charged for the number\n of inference units that you use.\n </p>",
8315+
"smithy.api#documentation": "<p>The minimum number of inference units to use. A single\n inference unit represents 1 hour of processing. </p>\n \n <p>For information about the number \n of transactions per second (TPS) that an inference unit can support, see \n <i>Running a trained Amazon Rekognition Custom Labels model</i> in the \n Amazon Rekognition Custom Labels Guide.\n </p>\n <p>Use a higher number to increase the TPS throughput of your model. You are charged for the number\n of inference units that you use.\n </p>",
83108316
"smithy.api#required": {}
83118317
}
8318+
},
8319+
"MaxInferenceUnits": {
8320+
"target": "com.amazonaws.rekognition#InferenceUnits",
8321+
"traits": {
8322+
"smithy.api#documentation": "<p>The maximum number of inference units to use for auto-scaling the model. If you don't\n specify a value, Amazon Rekognition Custom Labels doesn't auto-scale the model.</p>"
8323+
}
83128324
}
83138325
}
83148326
},

0 commit comments

Comments
 (0)