Interact with SAS

Interact with SAS

Hi guys,

I have a ready made model in DR, and I would like to transfer it to SAS, is it possible?

5 Replies

Hi Carlos - is there a reason you are looking to transfer the model into SAS, rather use the model in DataRobot?  Note that you can prepare data in SAS, send it to DataRobot for scoring, and retrieved scored results in SAS for further use.  This would allow for you to easily take advantage of a developed and deployed model within DataRobot, as well as enjoy the benefits of that deployment being tracked for data drift of the features input to the model.

0 Kudos

Hi doyouevendata,
I am a new user of DR.
The reason for transfer would be two: 1) company requirement; 2) need to run the model every day with new data.

My need is to get the SAS data on a server, run the model and then return the data to a table on the SAS server. This being done every day.

 

0 Kudos

Scoring the model inside DataRobot

If SAS is part of your pre/post-processing, you can still leverage model deployment and scoring on DataRobot; the process would be as follows:

  1. Collect data from source(s) and perform pre-processing steps.  This could be simple joins of data from your sources, and/or more complex logic; you would need to replicate whatever you did to the data you originally used in your historic training set.  Note DataRobot deployments are case sensitive for feature names as well.
  2. Save this data on the SAS server to a .csv file.
  3. Run a batch scoring command line utility on the SAS server to send the input.csv to DataRobot for scoring.  The scores will be sent back and the utility will create an output.csv file for you to use in your next processing step.
  4. Take the scored output.csv and perform the post-processing of the data as you proceed with next steps forward.

This requires two tasks;

  • Inside DataRobot, choosing a model within a project to take forward to production and registering it as a deployment.
  • Installing a batch scoring script or utility on the SAS server, available for windows/linux as python scripts or native binaries.

The above is highly recommended as the solution for scoring data through a SAS pipeline.  It takes advantage of deploying a model for usage with just a few clicks in the GUI, and that model is monitored over time for data drift and target drift, to let you know when your model may be getting stale and in need of retraining and replacement.

 

Scoring the model inside SAS

Premium versions of DataRobot include exportable versions of code, including Java binaries as well as a python rules based approximation the latter called DataRobot Prime.  It is not the exact model, but an approximated one to a model you base it on from the leaderboard.  It will receive its own leaderboard entry.  It would be possible to create a Prime model, export the code, at which point you could then port it over to SAS code.  This is a labor intensive process with possible introduction for error unless done programmatically however, and would come at the loss of the simple integrated drift tracking enjoyed by the DataRobot hosted deployment.  Some features are also not available; for example, the Prediction Explanations for a scored record are only available via the Prediction API and DataRobot deployment, but not from Prime.

 

Note that both scenarios could be run daily with new data.

Hi Carlos

It would be exceptionally complicated to attempt to recreate an exact datarobot model within SAS.

However - when you deploy a model in DataRobot it gives you an API end point which you can use to make predictions based on new data. 

I suggest that you call this API from SAS to apply the predictions to your data as a data connection. In datarobot, if you navigate to the "integrations" tab within  your deployment, it will show you the Python Code needed to connect to the API. From this you can get the information you need (key, endpoint, formats etc) that you can use to plug into your SAS ETL process.

 

Erica

Hi @doyouevendata , we need to import SAS models to DataRobot, how can we manage this, thank you.

0 Kudos