BookmarkSubscribeRSS Feed

Using SASCTL package to deploy and manage MLFlow models - a step by step introduction

Started ‎02-15-2022 by
Modified ‎04-20-2022 by
Views 4,893

It’s no secret that SAS Viya is a platform that supports the entire analytics lifecycle and allows a wide variety of users with different skills to collaborate. 

To better support our users, we want to ensure that they can interact with SAS Viya in the way that makes the most sense to them. For data scientists using Python, that is often through our open source packages, such as SWAT and SASCTL.

In this blog, we will explore what is SASCTL and introduce the new integration with MLflow.


What is SASCTL? 🧐

SASCTL is an open source package developed by SAS that allows Python data scientists to easily communicate with the SAS Viya platform. It can be used as a module or as a command line interface and gives you the ability to register models and modeling assets into SAS Model Manager directly from a Python IDE! Python Zip Model Management functionality, also known as PZMM, exists within the SASCTL package.  SASCTL supports a wide variety of Python model packages including fan-favorites sklearn and xgboost.  


Introducing support for MLflow 🔗

Many data scientists are leveraging MLflow, an open source MLOps platform, for managing modeling assets. To better support these users, we are integrating SASCTL with MLflow.

We currently support using SASCTL to generate and register modeling assets for MLflow models developed using a variety of common Python packages (such sklearn, statsmodels, scipy, and numpy) with plans to expand to more complex modeling packages. 


Get started ⬇️

To start leveraging SASCTL with MLflow, complete the following steps:  

  1. Install sasctl and MLflow to your Python environment.  
  2. Import sasctl, MLflow, and infer_signature from mlflow.models.signature in your Python code.  
  3. Build your model.  
  4. Create the MLflow signature.  
  5. Add the signature as a parameter for the MLflow logging function. 
  6. Point the pzmm.MLFlowModel.readMLmodelFile() function of sasctl to the MLflow files. 
  7. Generate the model metadata using sasctl. 
  8. Register model into Model Manager using pzmm.ImportModel() function of sasctl.
  9. Use Model Manager to test, deploy and monitor the model.

🎥 The following video walks through each of the steps with code: 



Other Resources 

Want to learn more about SAS Model Manager and Python Models? Check out the following links!  

If you liked the article, leave a comment below on what other enhancements you want to see to SASCTL!


So excited to see what's next in sasctl! 🐍

Version history
Last update:
‎04-20-2022 03:05 PM
Updated by:



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags