Skip to content

Commit 039cd20

Browse files
author
AWS
committed
Amazon SageMaker Service Update: API changes with respect to Lambda steps in model building pipelines. Adds several waiters to async Sagemaker Image APIs. Add more instance types to AppInstanceType field
1 parent b9a20ed commit 039cd20

File tree

3 files changed

+170
-8
lines changed

3 files changed

+170
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Amazon SageMaker Service",
4+
"contributor": "",
5+
"description": "API changes with respect to Lambda steps in model building pipelines. Adds several waiters to async Sagemaker Image APIs. Add more instance types to AppInstanceType field"
6+
}

services/sagemaker/src/main/resources/codegen-resources/service-2.json

+46-8
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@
230230
"errors":[
231231
{"shape":"ResourceLimitExceeded"}
232232
],
233-
"documentation":"<p>Creates an endpoint using the endpoint configuration specified in the request. Amazon SageMaker uses the endpoint to provision resources and deploy models. You create the endpoint configuration with the <a>CreateEndpointConfig</a> API. </p> <p> Use this API to deploy models using Amazon SageMaker hosting services. </p> <p>For an example that calls this method when deploying a model to Amazon SageMaker hosting services, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/ex1-deploy-model.html#ex1-deploy-model-boto\">Deploy the Model to Amazon SageMaker Hosting Services (Amazon Web Services SDK for Python (Boto 3)).</a> </p> <note> <p> You must not delete an <code>EndpointConfig</code> that is in use by an endpoint that is live or while the <code>UpdateEndpoint</code> or <code>CreateEndpoint</code> operations are being performed on the endpoint. To update an endpoint, you must create a new <code>EndpointConfig</code>.</p> </note> <p>The endpoint name must be unique within an Amazon Web Services Region in your Amazon Web Services account. </p> <p>When it receives the request, Amazon SageMaker creates the endpoint, launches the resources (ML compute instances), and deploys the model(s) on them. </p> <note> <p>When you call <a>CreateEndpoint</a>, a load call is made to DynamoDB to verify that your endpoint configuration exists. When you read data from a DynamoDB table supporting <a href=\"https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadConsistency.html\"> <code>Eventually Consistent Reads</code> </a>, the response might not reflect the results of a recently completed write operation. The response might include some stale data. If the dependent entities are not yet in DynamoDB, this causes a validation error. If you repeat your read request after a short time, the response should return the latest data. So retry logic is recommended to handle these possible issues. We also recommend that customers call <a>DescribeEndpointConfig</a> before calling <a>CreateEndpoint</a> to minimize the potential impact of a DynamoDB eventually consistent read.</p> </note> <p>When Amazon SageMaker receives the request, it sets the endpoint status to <code>Creating</code>. After it creates the endpoint, it sets the status to <code>InService</code>. Amazon SageMaker can then process incoming requests for inferences. To check the status of an endpoint, use the <a>DescribeEndpoint</a> API.</p> <p>If any of the models hosted at this endpoint get model data from an Amazon S3 location, Amazon SageMaker uses Amazon Web Services Security Token Service to download model artifacts from the S3 path you provided. Amazon Web Services STS is activated in your IAM user account by default. If you previously deactivated Amazon Web Services STS for a region, you need to reactivate Amazon Web Services STS for that region. For more information, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html\">Activating and Deactivating Amazon Web Services STS in an Amazon Web Services Region</a> in the <i>Amazon Web Services Identity and Access Management User Guide</i>.</p> <note> <p> To add the IAM role policies for using this API operation, go to the <a href=\"https://console.aws.amazon.com/iam/\">IAM console</a>, and choose Roles in the left navigation pane. Search the IAM role that you want to grant access to use the <a>CreateEndpoint</a> and <a>CreateEndpointConfig</a> API operations, add the following policies to the role. </p> <ul> <li> <p>Option 1: For a full Amazon SageMaker access, search and attach the <code>AmazonSageMakerFullAccess</code> policy.</p> </li> <li> <p>Option 2: For granting a limited access to an IAM role, paste the following Action elements manually into the JSON file of the IAM role: </p> <p> <code>\"Action\": [\"sagemaker:CreateEndpoint\", \"sagemaker:CreateEndpointConfig\"]</code> </p> <p> <code>\"Resource\": [</code> </p> <p> <code>\"arn:aws:sagemaker:region:account-id:endpoint/endpointName\"</code> </p> <p> <code>\"arn:aws:sagemaker:region:account-id:endpoint-config/endpointConfigName\"</code> </p> <p> <code>]</code> </p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/api-permissions-reference.html\">Amazon SageMaker API Permissions: Actions, Permissions, and Resources Reference</a>.</p> </li> </ul> </note>"
233+
"documentation":"<p>Creates an endpoint using the endpoint configuration specified in the request. Amazon SageMaker uses the endpoint to provision resources and deploy models. You create the endpoint configuration with the <a>CreateEndpointConfig</a> API. </p> <p> Use this API to deploy models using Amazon SageMaker hosting services. </p> <p>For an example that calls this method when deploying a model to Amazon SageMaker hosting services, see the <a href=\"https://github.com/aws/amazon-sagemaker-examples/blob/master/sagemaker-fundamentals/create-endpoint/create_endpoint.ipynb\">Create Endpoint example notebook.</a> </p> <note> <p> You must not delete an <code>EndpointConfig</code> that is in use by an endpoint that is live or while the <code>UpdateEndpoint</code> or <code>CreateEndpoint</code> operations are being performed on the endpoint. To update an endpoint, you must create a new <code>EndpointConfig</code>.</p> </note> <p>The endpoint name must be unique within an Amazon Web Services Region in your Amazon Web Services account. </p> <p>When it receives the request, Amazon SageMaker creates the endpoint, launches the resources (ML compute instances), and deploys the model(s) on them. </p> <note> <p>When you call <a>CreateEndpoint</a>, a load call is made to DynamoDB to verify that your endpoint configuration exists. When you read data from a DynamoDB table supporting <a href=\"https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadConsistency.html\"> <code>Eventually Consistent Reads</code> </a>, the response might not reflect the results of a recently completed write operation. The response might include some stale data. If the dependent entities are not yet in DynamoDB, this causes a validation error. If you repeat your read request after a short time, the response should return the latest data. So retry logic is recommended to handle these possible issues. We also recommend that customers call <a>DescribeEndpointConfig</a> before calling <a>CreateEndpoint</a> to minimize the potential impact of a DynamoDB eventually consistent read.</p> </note> <p>When Amazon SageMaker receives the request, it sets the endpoint status to <code>Creating</code>. After it creates the endpoint, it sets the status to <code>InService</code>. Amazon SageMaker can then process incoming requests for inferences. To check the status of an endpoint, use the <a>DescribeEndpoint</a> API.</p> <p>If any of the models hosted at this endpoint get model data from an Amazon S3 location, Amazon SageMaker uses Amazon Web Services Security Token Service to download model artifacts from the S3 path you provided. Amazon Web Services STS is activated in your IAM user account by default. If you previously deactivated Amazon Web Services STS for a region, you need to reactivate Amazon Web Services STS for that region. For more information, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html\">Activating and Deactivating Amazon Web Services STS in an Amazon Web Services Region</a> in the <i>Amazon Web Services Identity and Access Management User Guide</i>.</p> <note> <p> To add the IAM role policies for using this API operation, go to the <a href=\"https://console.aws.amazon.com/iam/\">IAM console</a>, and choose Roles in the left navigation pane. Search the IAM role that you want to grant access to use the <a>CreateEndpoint</a> and <a>CreateEndpointConfig</a> API operations, add the following policies to the role. </p> <ul> <li> <p>Option 1: For a full Amazon SageMaker access, search and attach the <code>AmazonSageMakerFullAccess</code> policy.</p> </li> <li> <p>Option 2: For granting a limited access to an IAM role, paste the following Action elements manually into the JSON file of the IAM role: </p> <p> <code>\"Action\": [\"sagemaker:CreateEndpoint\", \"sagemaker:CreateEndpointConfig\"]</code> </p> <p> <code>\"Resource\": [</code> </p> <p> <code>\"arn:aws:sagemaker:region:account-id:endpoint/endpointName\"</code> </p> <p> <code>\"arn:aws:sagemaker:region:account-id:endpoint-config/endpointConfigName\"</code> </p> <p> <code>]</code> </p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/api-permissions-reference.html\">Amazon SageMaker API Permissions: Actions, Permissions, and Resources Reference</a>.</p> </li> </ul> </note>"
234234
},
235235
"CreateEndpointConfig":{
236236
"name":"CreateEndpointConfig",
@@ -3314,6 +3314,14 @@
33143314
"ml.m5.12xlarge",
33153315
"ml.m5.16xlarge",
33163316
"ml.m5.24xlarge",
3317+
"ml.m5d.large",
3318+
"ml.m5d.xlarge",
3319+
"ml.m5d.2xlarge",
3320+
"ml.m5d.4xlarge",
3321+
"ml.m5d.8xlarge",
3322+
"ml.m5d.12xlarge",
3323+
"ml.m5d.16xlarge",
3324+
"ml.m5d.24xlarge",
33173325
"ml.c5.large",
33183326
"ml.c5.xlarge",
33193327
"ml.c5.2xlarge",
@@ -3325,12 +3333,21 @@
33253333
"ml.p3.2xlarge",
33263334
"ml.p3.8xlarge",
33273335
"ml.p3.16xlarge",
3336+
"ml.p3dn.24xlarge",
33283337
"ml.g4dn.xlarge",
33293338
"ml.g4dn.2xlarge",
33303339
"ml.g4dn.4xlarge",
33313340
"ml.g4dn.8xlarge",
33323341
"ml.g4dn.12xlarge",
3333-
"ml.g4dn.16xlarge"
3342+
"ml.g4dn.16xlarge",
3343+
"ml.r5.large",
3344+
"ml.r5.xlarge",
3345+
"ml.r5.2xlarge",
3346+
"ml.r5.4xlarge",
3347+
"ml.r5.8xlarge",
3348+
"ml.r5.12xlarge",
3349+
"ml.r5.16xlarge",
3350+
"ml.r5.24xlarge"
33343351
]
33353352
},
33363353
"AppList":{
@@ -14040,6 +14057,20 @@
1404014057
"max":2048,
1404114058
"pattern":"arn:aws[a-z\\-]*:lambda:[a-z0-9\\-]*:[0-9]{12}:function:.*"
1404214059
},
14060+
"LambdaStepMetadata":{
14061+
"type":"structure",
14062+
"members":{
14063+
"Arn":{
14064+
"shape":"String256",
14065+
"documentation":"<p>The Amazon Resource Name (ARN) of the Lambda function that was run by this step execution.</p>"
14066+
},
14067+
"OutputParameters":{
14068+
"shape":"OutputParameterList",
14069+
"documentation":"<p>A list of the output parameters of the Lambda step.</p>"
14070+
}
14071+
},
14072+
"documentation":"<p>Metadata for a Lambda step.</p>"
14073+
},
1404314074
"LastModifiedTime":{"type":"timestamp"},
1404414075
"LineageEntityParameters":{
1404514076
"type":"map",
@@ -19178,17 +19209,24 @@
1917819209
},
1917919210
"Model":{
1918019211
"shape":"ModelStepMetadata",
19181-
"documentation":"<p>Metadata for the Model step.</p>"
19212+
"documentation":"<p>The Amazon Resource Name (ARN) of the model that was created by this step execution.</p>"
1918219213
},
1918319214
"RegisterModel":{
1918419215
"shape":"RegisterModelStepMetadata",
19185-
"documentation":"<p>Metadata for the RegisterModel step.</p>"
19216+
"documentation":"<p>The Amazon Resource Name (ARN) of the model package the model was registered to by this step execution.</p>"
1918619217
},
1918719218
"Condition":{
1918819219
"shape":"ConditionStepMetadata",
19189-
"documentation":"<p>If this is a Condition step metadata object, details on the condition.</p>"
19220+
"documentation":"<p>The outcome of the condition evaluation that was run by this step execution.</p>"
19221+
},
19222+
"Callback":{
19223+
"shape":"CallbackStepMetadata",
19224+
"documentation":"<p>The URL of the Amazon SQS queue used by this step execution, the pipeline generated token, and a list of output parameters.</p>"
1919019225
},
19191-
"Callback":{"shape":"CallbackStepMetadata"}
19226+
"Lambda":{
19227+
"shape":"LambdaStepMetadata",
19228+
"documentation":"<p>The Amazon Resource Name (ARN) of the Lambda function that was run by this step execution and a list of output parameters.</p>"
19229+
}
1919219230
},
1919319231
"documentation":"<p>Metadata for a step execution.</p>"
1919419232
},
@@ -21487,14 +21525,14 @@
2148721525
"members":{
2148821526
"MaxRuntimeInSeconds":{
2148921527
"shape":"MaxRuntimeInSeconds",
21490-
"documentation":"<p>The maximum length of time, in seconds, that a training or compilation job can run. If the job does not complete during this time, Amazon SageMaker ends the job.</p> <p>When <code>RetryStrategy</code> is specified in the job request, <code>MaxRuntimeInSeconds</code> specifies the maximum time for all of the attempts in total, not each individual attempt.</p> <p>The default value is 1 day. The maximum value is 28 days.</p>"
21528+
"documentation":"<p>The maximum length of time, in seconds, that a training or compilation job can run.</p> <p>For compilation jobs, if the job does not complete during this time, you will receive a <code>TimeOut</code> error. We recommend starting with 900 seconds and increase as necessary based on your model.</p> <p>For all other jobs, if the job does not complete during this time, Amazon SageMaker ends the job. When <code>RetryStrategy</code> is specified in the job request, <code>MaxRuntimeInSeconds</code> specifies the maximum time for all of the attempts in total, not each individual attempt. The default value is 1 day. The maximum value is 28 days.</p>"
2149121529
},
2149221530
"MaxWaitTimeInSeconds":{
2149321531
"shape":"MaxWaitTimeInSeconds",
2149421532
"documentation":"<p>The maximum length of time, in seconds, that a managed Spot training job has to complete. It is the amount of time spent waiting for Spot capacity plus the amount of time the job can run. It must be equal to or greater than <code>MaxRuntimeInSeconds</code>. If the job does not complete during this time, Amazon SageMaker ends the job.</p> <p>When <code>RetryStrategy</code> is specified in the job request, <code>MaxWaitTimeInSeconds</code> specifies the maximum time for all of the attempts in total, not each individual attempt.</p>"
2149521533
}
2149621534
},
21497-
"documentation":"<p>Specifies a limit to how long a model training job, model compilation job, or hyperparameter tuning job can run. It also specifies how long a managed Spot training job has to complete. When the job reaches the time limit, Amazon SageMaker ends the training or compilation job. Use this API to cap model training costs.</p> <p>To stop a job, Amazon SageMaker sends the algorithm the <code>SIGTERM</code> signal, which delays job termination for 120 seconds. Algorithms can use this 120-second window to save the model artifacts, so the results of training are not lost. </p> <p>The training algorithms provided by Amazon SageMaker automatically save the intermediate results of a model training job when possible. This attempt to save artifacts is only a best effort case as model might not be in a state from which it can be saved. For example, if training has just started, the model might not be ready to save. When saved, this intermediate data is a valid model artifact. You can use it to create a model with <code>CreateModel</code>.</p> <note> <p>The Neural Topic Model (NTM) currently does not support saving intermediate model artifacts. When training NTMs, make sure that the maximum runtime is sufficient for the training job to complete.</p> </note>"
21535+
"documentation":"<p>Specifies a limit to how long a model training job, model compilation job, or hyperparameter tuning job can run. It also specifies how long a managed Spot training job has to complete. When the job reaches the time limit, Amazon SageMaker ends the training or compilation job. Use this API to cap model training costs.</p> <p>To stop a training job, Amazon SageMaker sends the algorithm the <code>SIGTERM</code> signal, which delays job termination for 120 seconds. Algorithms can use this 120-second window to save the model artifacts, so the results of training are not lost. </p> <p>The training algorithms provided by Amazon SageMaker automatically save the intermediate results of a model training job when possible. This attempt to save artifacts is only a best effort case as model might not be in a state from which it can be saved. For example, if training has just started, the model might not be ready to save. When saved, this intermediate data is a valid model artifact. You can use it to create a model with <code>CreateModel</code>.</p> <note> <p>The Neural Topic Model (NTM) currently does not support saving intermediate model artifacts. When training NTMs, make sure that the maximum runtime is sufficient for the training job to complete.</p> </note>"
2149821536
},
2149921537
"String":{"type":"string"},
2150021538
"String1024":{

services/sagemaker/src/main/resources/codegen-resources/waiters-2.json

+118
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,124 @@
188188
"state": "failure"
189189
}
190190
]
191+
},
192+
"ImageCreated": {
193+
"delay": 60,
194+
"maxAttempts": 60,
195+
"operation": "DescribeImage",
196+
"acceptors": [
197+
{
198+
"expected": "CREATED",
199+
"matcher": "path",
200+
"state": "success",
201+
"argument": "ImageStatus"
202+
},
203+
{
204+
"expected": "CREATE_FAILED",
205+
"matcher": "path",
206+
"state": "failure",
207+
"argument": "ImageStatus"
208+
},
209+
{
210+
"expected": "ValidationException",
211+
"matcher": "error",
212+
"state": "failure"
213+
}
214+
]
215+
},
216+
"ImageUpdated": {
217+
"delay": 60,
218+
"maxAttempts": 60,
219+
"operation": "DescribeImage",
220+
"acceptors": [
221+
{
222+
"expected": "CREATED",
223+
"matcher": "path",
224+
"state": "success",
225+
"argument": "ImageStatus"
226+
},
227+
{
228+
"expected": "UPDATE_FAILED",
229+
"matcher": "path",
230+
"state": "failure",
231+
"argument": "ImageStatus"
232+
},
233+
{
234+
"expected": "ValidationException",
235+
"matcher": "error",
236+
"state": "failure"
237+
}
238+
]
239+
},
240+
"ImageDeleted": {
241+
"delay": 60,
242+
"maxAttempts": 60,
243+
"operation": "DescribeImage",
244+
"acceptors": [
245+
{
246+
"expected": "ResourceNotFoundException",
247+
"matcher": "error",
248+
"state": "success"
249+
},
250+
{
251+
"expected": "DELETE_FAILED",
252+
"matcher": "path",
253+
"state": "failure",
254+
"argument": "ImageStatus"
255+
},
256+
{
257+
"expected": "ValidationException",
258+
"matcher": "error",
259+
"state": "failure"
260+
}
261+
]
262+
},
263+
"ImageVersionCreated": {
264+
"delay": 60,
265+
"maxAttempts": 60,
266+
"operation": "DescribeImageVersion",
267+
"acceptors": [
268+
{
269+
"expected": "CREATED",
270+
"matcher": "path",
271+
"state": "success",
272+
"argument": "ImageVersionStatus"
273+
},
274+
{
275+
"expected": "CREATE_FAILED",
276+
"matcher": "path",
277+
"state": "failure",
278+
"argument": "ImageVersionStatus"
279+
},
280+
{
281+
"expected": "ValidationException",
282+
"matcher": "error",
283+
"state": "failure"
284+
}
285+
]
286+
},
287+
"ImageVersionDeleted": {
288+
"delay": 60,
289+
"maxAttempts": 60,
290+
"operation": "DescribeImageVersion",
291+
"acceptors": [
292+
{
293+
"expected": "ResourceNotFoundException",
294+
"matcher": "error",
295+
"state": "success"
296+
},
297+
{
298+
"expected": "DELETE_FAILED",
299+
"matcher": "path",
300+
"state": "failure",
301+
"argument": "ImageVersionStatus"
302+
},
303+
{
304+
"expected": "ValidationException",
305+
"matcher": "error",
306+
"state": "failure"
307+
}
308+
]
191309
}
192310
}
193311
}

0 commit comments

Comments
 (0)