Skip to content

starkblaze01/Deploying-a-Sentiment-Analysis-Model

Repository files navigation

Deploying-a-Sentiment-Analysis-Model

This project is an assignment for Deep Learning Nanodegree provided by Udacity.

Here are steps you need to follow in order to complete this project on Udacity:

  1. Create an AWS account.
  2. Request for AWS credits from Udacity here. This might take up to 48 hours. You will receive a promo code which you will use on your AWS account.
  3. Now, you need to request for resource limit increase. For deployment we are using ml.m4.xlarge machine but for training we need ml.p2.xlarge. Here is an artcile by udacity on how to file a ticket to get resource limit increased. This might take time depending upon your region. So, to save time you can use ml.m4.xlarge instance for training too but training model can take up to 2-3 hours(Still less than the average time it takes to get ml.p2.xlarge resource limit increased).
  4. ml.m4.xlarge usually comes under free tier. But the number of instances are still limited so make sure to remove any running instances on this machine in any region before you use it. You might face one more issue when you try to deploy your model using ml.m4.xlarge, because this resource is different for deployment and training, and not included in free-tier for some of the regions. So, you have to file the ticket for this also as you did in above setp for ml.p2.xlarge. Make sure you choose Sagemaker hosting instead of Sagemaker training this time. And resource for which you want to get limit increased is ml.m4.xlarge by instance 1(Make sure you delete other endpoints if already running).
  5. At last you need to make changes in code also which is not listed in TODO. In the function test_reviews change int(predictor.predict(review_input)) to float(predictor.predict(review_input)). These steps should be enough to get your project running if you have set up IAM role, Lambda function, and API Gateway properly.