Cloudformation Deployment for Serverless Sagemaker Model Endpoint

0

Hi, i want to deploy a serverless model using CloudFormation.

I've created the model, the endpoint configuration, and when I try to create the endpoint the script times out, because it can't find a saved model to attach to the endpoint (because I never trained one for this instance).

I've tried to look around for a trainingjob cloudformation API, but there doesn't seem to be one.

How do I solve this issue?

2 Answers
0

In general I would like to confirm if you are bringing your own model which is trained outside the SageMaker ?

If so SageMaker expects to Upload the pre-trained model to S3 and specify the ModelDataUrl i.e s3 location along with the Container details with the CreateModel API call. For more details on bring your own model, please refer to our public examples [1][2][4][5]

Also as an alternative please refer to the following example to Bring your own model with Amazon SageMaker script mode which can be used for training and hosting ML models using the script mode[2]

If you have other questions or require any further clarifications please don't hesitate to reply or open a premium support case with the CloudFormation team for further investigation of the issue along with the error message and the resource details.

[1] https://sagemaker-examples.readthedocs.io/en/latest/advanced_functionality/xgboost_bring_your_own_model/xgboost_bring_your_own_model.html#Upload-the-pre-trained-model-to-S3

[2] https://aws.amazon.com/blogs/machine-learning/bring-your-own-model-with-amazon-sagemaker-script-mode/

[3] https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModel.html

[4] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-model.html

[5] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-model-containerdefinition.html

AWS
answered 2 years ago
0

thank you these docs were very helpful. It appears that when I use cloudformation for provisioning resources for my model, I need to provision the ECR, then do the training step, then create the model, enpoint config, then endpoint. I can't really do it all in 1 script, i guess.

everything works now for me, so thank you for pointing me to this resource!

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions