Since you have landed here, you must have an idea what AI and ML is, now you are probably looking for a quick way to build machine learning solutions for your business or yourself.
In this article you will learn
- What are the benefits of cloud based ML ?
- What is AWS SageMaker Studio ?
- Configure SageMaker Studio
- Access JumpStart
- Launch an end to end solution with JumpStart
- Test the solution with your own data
- Access the model endpoint
- Clean up the resources
Machine Learning on cloud computing platforms such as AWS, Azure and Google Cloud has made deployment of ML solutions a few minutes task. It overcomes the challenges in introducing ml based solutions in enterprises and businesses. These challenges include the burden of setting up a development environment, lack of expertise, deployment cost and last but not the least, scaling up the system. Cloud Computing platforms are quickly adapting to changes in AI and providing enhanced services. The above mentioned challenges can also be handled with cloud based ML quite effectively.
Other than that, Cloud ML services provide a lot of benefits to Machine Learning Engineers and Data Scientists. Some of them are listed below.
- Benefits of cloud based ML
- Enables training and finetuning of large machine learning models which may require a GPU.
- Handling large data for visualizations and feature engineering is not a memory crashing task anymore.
- Easily connect multiple applications and data sources to ML models.
- Quickly test and deploy ML models.
- Easier to manage increase in demand and scale up production.
- Cloud’s pay as you go model works best for developing proof of concept systems and selecting the best solution out of many.
- It allows to easily finetune existing state of the art models without much effort.
- It’s easy to avoid the nightmare of setting up development environment on local machines. ( I personally could not never setup a complete development environment on my own laptop).
Since we all are high about cloud ML, let’s do it without wasting any time. In this article we are going to get into AWS SageMaker Studio.
2. What is SageMaker?
Amazon SageMaker is a fully managed machine learning service. With SageMaker, data scientists and developers can quickly and easily build and train machine learning models, and then directly deploy them into a production-ready hosted environment.
SageMaker provides an integrated environment to prepare datasets, analyze them, build, train and deploy production-ready ML models. All in one using Jupyter notebooks environment which allows multiple instances. You have the freedom of using SageMaker’s built in algorithms, tensorflow, Pytorch, MXNet models and even your own models. It allows you to integrate other AWS ML and non ML services such as Apache Spark and AWS Lambda with your notebooks.
3. What is SageMaker Studio
SageMaker Studio came around in December 2019.
Amazon SageMaker Studio is a web-based, integrated development environment (IDE) for machine learning that lets you build, train, debug, deploy, and monitor your machine learning models.
SageMaker studio provides more control over ML workflow than old instance based SageMaker notebooks.
If you have not already signed up on AWS, here is the link to follow steps.
Getting started with machine Learning on SageMaker Studio is very easy in 2021, thanks to the new JumpStart feature in SageMaker.
4. What is JumpStart?
SageMaker has just introduced an intresting feature named JumpStart. It helps to get an idea of SageMaker features and capabilities through single click solutions, pretrained models and example notebooks. It allows you to train, finetune and deploy the models as well.
5. Configure Amazon SageMaker Studio
Sign in to AWS and go to AWS Management Console.
Search “SageMaker” using top search bar.
Open Amazon SageMaker from results.
Next you will be asked for Username and Execution role.
Enter a username and select “create new role”.
SageMaker studio will automatically generate recommended permissions for your notebook.
Learn more about IAMs here.
After setting up role and username, press Submit.
(If nothing happens, refresh the page, write the username again and select existing IAM role which have SageMaker in it. )
It will take a while to set up SageMaker Studio. It will show a green status after it’s done.
Open the studio for the newly created user. And grab your coffee to defeat cold, as it will take around 20 minutes to set up. Or may be you can sit tight and watch these lines moving and rethink about your life.
Once it’s done,
6. Access JumpStart
You will see two options to access Jumpstart. Select any one.
7. Deploy Handwriting Recognition Solution
JumpStart homepage has different solutions and models available. Let’s say I have a lot of old handwritten journals and I want them digitized. Press “view all” and find “HandWriting Recognition” .
Opening it, you can learn more about sample dataset, how it works and which AWS resources are used.
Press “Launch” to deploy the solution. This will take another 5–10 minutes. This single click deployment is life savior for quick projects. You will know that it’s done when the status is completed.
let’s paly with Endpoint in notebook. The notebook will open in new tab. You have to wait for the kernel to get ready. Keep an eye on the kernel status at the bottom right.
At the top bar of the notebook, kernel and instance details are also available once the kernel has started
By running all the code cells, we can see the output image with bounding box around words and their labels.
8. Test with your own data
Let’s test our own image with this solution. Cell 4 tells us about the location of test file.
To upload your own text image, Go to the file directory > data > sample and press upload icon, as shown in the image. And run cell 4 again with updated image name.
9. Access EndPoint Monitoring and Configuration details
Once we know if it works in our case, go back to JumpStart tab, press the name of endpoint.
You can monitor your endpoint and get stats from here. While the AWS settings contain information to use the model in real time.
You can also get data preparation and model training Notebooks from Jumpstart tab.
10. Clean Up
Once you are done with everything, you should clean up all the resources to avoid out of budget bill.
This will delete everything created through this solution.
If you want to delete the studio and the user, go back to Amazon SageMaker Studio and delete all apps
Then delete the user.
In conclusion, we have discussed about the benefits of cloud based ML for machine learning engineers, data scientists and businesses. AWS SageMaker provides high level services to build , train and deploy ML models. We used Amazon SageMaker Studio to deploy an end to end solution from JumpStart for handwriting recognition and used it with our own data.