Sagemaker-python-sdk: direct predict without deploy?

Created on 6 Jul 2019  Â·  3Comments  Â·  Source: aws/sagemaker-python-sdk

System Information

  • *Framework *: DeepAR
  • Framework Version:
  • Python Version:
  • CPU or GPU: CPU
  • Python SDK Version:
  • Are you using a custom image: no

Describe the problem

After estimator.fit() for the deepar model, is there a way to do prediction without deploy it? Since it has an instance limit error when I deploy for instance.

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 tried to use

predictor = estimator.deploy(
    initial_instance_count=1,
    instance_type='local',
    predictor_cls=DeepARPredictor)

but still got this error message.

I wonder can we directly predict locally? Since I don't have authority to increase the limit in the company.

Thanks

  • Exact command to reproduce:

All 3 comments

Hi @jguo16, thank you for using SageMaker! You need to deploy your trained model to an endpoint to make predictions.

If you have hit the limit of ml.m4.xlarge instance, you can check your limit of other CPU instances and use the available ones you have to deploy the model.

Thank you for your reply. I tried 2 different CPU instances for training,
and they both succeed. But when I used one for train and one for deploy, it
still have same error.

On Fri, Jul 5, 2019 at 16:38 Chuyang notifications@github.com wrote:

Hi @jguo16 https://github.com/jguo16, thank you for using SageMaker!
You need to deploy your trained model to an endpoint to make predictions.

If you have hit the limit of ml.m4.xlarge instance, you can check your
limit of other CPU instances and use the available ones you have to deploy
the model.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/aws/sagemaker-python-sdk/issues/908?email_source=notifications&email_token=AFNOI4YFB7WRTDT63TJZEM3P57LN7A5CNFSM4H6PASN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZKOKMA#issuecomment-508880176,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFNOI4ZVN7KGJJ5WOIAWEPTP57LN7ANCNFSM4H6PASNQ
.

Hi @jguo16,

Training and hosting has separate limits, they are not shared.

In your case, for example, if you have 2 ml.m4.xlarge in Training limits, then you are OK to train with 2 such instances. However, this does not mean you can allocate 1 of your 2 ml.m4.xlarge for training and the other for hosting. You will need to check your Hosting instance limit to decide which instance type you can use for deploying the model.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cgarciae picture cgarciae  Â·  5Comments

velociraptor111 picture velociraptor111  Â·  3Comments

stevehawley picture stevehawley  Â·  3Comments

gautiese picture gautiese  Â·  4Comments

nkconnor picture nkconnor  Â·  5Comments