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개 답변
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
답변함 2년 전
profile picture
전문가
검토됨 24일 전
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!

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠