SAS Container Runtime (SCR) allows you to publish a decision or rule set developed with SAS Intelligent Decisioning as a container image in Azure. The stable SAS Viya version 2021.1.4 adds SCR (SCR, pronounced “soccer”) support for decisions and rule sets, in addition to SAS models. This post details the steps to publish a SAS decision or rule set as an Azure container image and validate the publishing. Scoring the decisions will be covered in separate posts.
Watch the following short video to understand the end result.
Firstly, the type of decisions you can publish today:
Read more about it in SAS Intelligent Decisioning | 2021.1.4.
The steps to publish SAS decisions or rule sets are the following.
The first three steps are exactly the same in How to Publish a SAS Model to Azure with SCR: A Start-to-Finish Guide and won't be repeated here. This post will focus only on decision or rule set publishing and publishing validation .
To publish to Azure, you need at least a rule set to begin with:
You only need to configure the Azure publishing destination once. SAS Model Manager and SAS Intelligent Decisioning are sharing the destination.
With the Azure publishing destination now defined:
To publish the decision to Azure is very easy.
What happens during publishing? Switch to the Azure portal, in the SAS Viya Azure Kubernetes Service (AKS) cluster. AKS cluster > Workloads > Pods > sorted by Age descending, you will see several pods spawned:
At some point during publishing you would see a kaniko pod. Kaniko is a tool to build container images from a Dockerfile, inside a container or Kubernetes cluster. Kaniko is used by SCR.
After publishing is successful, you will see your SCR image in the Azure Container Registry, under Repositories.
To validate your publishing destination, select the decision, go to Scoring > Publishing Validation, select an input table and run the validation.
During the publishing validation, switch to the Azure Kubernetes Service (AKS) cluster. From AKS cluster > Workloads > Pods > sort by Age descending, and you will see a similar list:
The scoring pod is where the publishing validation happens and where the decision is tested against input data.
When you open the pod events, you can see the scoring pod:
The pod will run for a while. This is normal. When the pod is terminated, publishing validation will complete. Back in SAS Intelligent Decisioning, click on Results:
The output shows the Bid values, just like when you test the decision in SAS.
The code section will reveal python code, passing commands to the AKS cluster to create a deployment, a service. It seems to be very helpful if you want to debug and run the code step by step.
The log provides a few metrics: the process to create the container takes about 5 minutes. While it might seem a bit long, the time is very similar to the creation of an Azure Container instance.
Notice the container endpoint. It runs on a port in the 30000-32767 range. The IP is a private Azure IP, known within the Kubernetes Service resource group virtual network.
The publishing and validation mechanism for rule sets is exactly the same as for decisions.
In this post, you learnt how to publish SAS Intelligent Decisioning rule sets and decisions to Azure and how to validate their publishing.
Note that once the SCR images are in Azure, there is zero dependency on SAS Viya for decision scoring. Azure takes over. To change the decision and publish a new version, yes, you will still require SAS Viya.
You can deploy your container image in a number of ways and score the decisions or the rule sets. Read more about it in future posts.
Thank you for your time reading this post. If you found it useful, like it. Please comment and tell us what you think about the new SCR and Azure publishing destination.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.