Amazon SageMaker Canvas now supports deploying machine learning (ML) models to real-time inference endpoints, allowing you to put your ML models into production and drive actions based on ML-driven insights . SageMaker Canvas is a no-code workspace that enables citizen analysts and data scientists to generate accurate ML predictions for their business needs.
Until now, SageMaker Canvas offered the ability to evaluate an ML model, generate grouped predictions, and run what-if analyzes in its interactive workspace. But you can now also deploy models to Amazon SageMaker endpoints for real-time inference, making it easier to use model predictions and take actions outside of the SageMaker Canvas workspace. The ability to directly deploy ML models from SageMaker Canvas eliminates the need to manually export, configure, test, and deploy ML models to production, reducing complexity and saving time. It also makes operationalizing ML models more accessible to individuals, without the need to write code.
In this article, we explain the process to deploy a template in SageMaker Canvas to an endpoint in real time.
For our use case, we assume the role of a business user in the marketing department of a mobile operator and we have successfully created an ML model in SageMaker Canvas to identify customers at potential churn risk. Using the predictions generated by our model, we now want to move this from our development environment to production. To streamline the process of deploying our model endpoint for inference, we deploy ML models directly from SageMaker Canvas, eliminating the need to manually export, configure, test, and deploy ML models in production. This helps reduce complexity, saves time and also makes implementing ML models more accessible to individuals, without the need to write code.
The workflow steps are as follows:
- Upload a new dataset with the current customer population to SageMaker Canvas. For the full list of supported data sources, see Import data into Canvas.
- Create ML models and analyze their performance metrics. For instructions, see Create a custom template And Evaluate your model’s performance in Amazon SageMaker Canvas.
- Deploy approved model version as an endpoint for real-time inference.
You can complete these steps in SageMaker Canvas without writing a single line of code.
For this walkthrough, make sure the following prerequisites are met:
- To deploy model versions to SageMaker endpoints, the SageMaker Canvas administrator must grant the necessary permissions to the SageMaker Canvas user, which you can manage in the SageMaker domain that hosts your SageMaker Canvas application. For more information, see Managing permissions in Canvas.
- Implement the prerequisites mentioned in Predict customer churn with no-code machine learning using Amazon SageMaker Canvas.
You should now have three model versions trained on historical churn forecast data in Canvas:
- V1 trained with all 21 features and a quick build setup with a model score of 96.903%
- V2 trained with all 19 features (phone and status features removed) and fast build setup and improved accuracy of 97.403%
- V3 trained with a standard build configuration with a model score of 97.103%
Use the Customer Churn Prediction Model
Enable View advanced metrics on the model details page and review the objective metrics associated with each version of the model so you can select the best performing model to deploy to SageMaker as an endpoint.
Based on the performance measurements, we select version 2 to deploy.
Configure the template deployment settings: deployment name, instance type, and number of instances.
As a starting point, Canvas will automatically recommend the best instance type and number of instances for deploying your model. You can modify it according to the needs of your workload.
You can test the deployed SageMaker inference endpoint directly from SageMaker Canvas.
You can modify the input values using the SageMaker Canvas user interface to infer additional churn prediction.
Let’s now move on to Amazon SageMaker Studio and check the deployed endpoint.
Open a notebook in SageMaker Studio and run the following code to infer the endpoint of the deployed model. Change the template endpoint name to your own template endpoint name.
Our original template endpoint uses an ml.m5.xlarge instance and 1 instance count. Now let’s say you expect the number of end users inferring your model’s endpoint to increase and you want to allocate more compute capacity. You can accomplish this directly from SageMaker Canvas by choosing Update configuration.
To avoid incurring future charges, delete the resources you created following this post. This includes logging out of SageMaker Canvas and removing deployed SageMaker endpoint. SageMaker Canvas charges you for the duration of the session and we recommend that you log out of SageMaker Canvas when you are not using it. Refer to Signing out of Amazon SageMaker Canvas for more details.
In this article, we explained how SageMaker Canvas can deploy ML models to real-time inference endpoints, allowing you to put your ML models into production and drive actions based on ML-driven insights . In our example, we showed how an analyst can quickly build a highly accurate predictive ML model without writing any code, deploy it to SageMaker as an endpoint, and test the model endpoint from within SageMaker Canvas, as well. only from a SageMaker Studio notebook.
To start your low-code/no-code ML journey, refer to Amazon SageMaker Canvas.
Special thanks to everyone who contributed to the launch: Prashanth Kurumaddali, Abishek Kumar, Allen Liu, Sean Lester, Richa Sundrani and Alicia Qi.
about the authors
Janisha Anand is a Senior Product Manager on the Amazon SageMaker Low/No Code ML team, which includes SageMaker Canvas and SageMaker Autopilot. She enjoys coffee, staying active, and spending time with her family.
Indy Sawhney is a senior customer solutions leader at Amazon Web Services. Always working backwards from customer problems, Indy advises executives of AWS enterprise customers throughout their unique cloud transformation journey. He has over 25 years of experience helping businesses adopt emerging technologies and business solutions. Indy is a deep specialist in the AWS field technical community for AI/ML, with a specialization in generative AI and Amazon SageMaker low-code/no-code solutions.