SAS Communities Library

We’re smarter together. Learn from this collection of community knowledge and add your expertise.
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 8,507

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: 

 

SASCTL and MLFlow with SKLearn Demo.mp4
Video Player is loading.
Current Time 0:00
Duration 1:46
Loaded: 0%
Stream Type LIVE
Remaining Time 1:46
 
1x
    • Chapters
    • descriptions off, selected
    • captions off, selected
    • default, selected
    (view in My Videos)

     

    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!

    Comments

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

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

    sas-innovate-white.png

    Our biggest data and AI event of the year.

    Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

    Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

     

    Register now!

    SAS AI and Machine Learning Courses

    The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.

    Get started

    Article Tags