I am following the sage maker documentation to train and deploy an ML model. I am using the high-level Python library provided by Amazon SageMaker to achieve this.
kmeans_predictor = kmeans.deploy(initial_instance_count=1,
instance_type='ml.m4.xlarge')
The deployment fails with error
ResourceLimitExceeded: An error occurred (ResourceLimitExceeded) when calling the CreateEndpoint operation: The account-level service limit 'ml.c4.8xlarge for endpoint usage' is 0 Instances, with current utilization of 0 Instances and a request delta of 1 Instances.
Where am I going wrong?
SageMaker does not allow you to schedule training jobs. SageMaker does not provide a mechanism for easily tracking metrics logged during training. We often fit feature extraction and model pipelines. We can inject the model artifacts into AWS-provided containers, but we cannot inject the feature extractors.
You must shut down the instance to stop incurring charges. If you shut down the notebook running on the instance but don't shut down the instance, you will still incur charges.
Amazon SageMaker currently requires Docker images to reside in Amazon ECR. To push an image to ECR, and not the central Docker registry, you must tag it with the registry hostname. Unlike Docker Hub, Amazon ECR images are private by default, which is a good practice with Amazon SageMaker.
Under free_tier AWS account, use 'InstanceType':'ml.t2.medium' to successfully deploy a machine learning model. By default, if you are following AWS tutorials online, you will end up using 'ml.m4.xlarge' which leads to this error.
The error is due to account-level service limit. Free_tier account get the error when using EC2 instance type 'ml.m4.xlarge'.Therefore, use 'ml.t2.medium' instead of ml.m4.xlarge'. Usually, while creating AWS endpoint, free_account holders get below error:
ResourceLimitExceeded: An error occurred (ResourceLimitExceeded) when calling the CreateEndpoint operation: The account-level service limit 'ml.m4.xlarge for endpoint usage' is 0 Instances, with current utilization of 0 Instances and a request delta of 1 Instances. Please contact AWS support to request an increase for this limit.
I resolved the issue by changing the instance type:
kmeans_predictor = kmeans.deploy(initial_instance_count=1,
instance_type='ml.t2.medium')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With