BookmarkSubscribeRSS Feed
Serinac01
Calcite | Level 5

Hi

 

After developing a model using various techniques in model studio

 

I am unable to get the base programming language for the bespoke model i.e. scoring codes

 

I can get the astore procedure and score data on the cloud but would like to get functionality to get the scoring code downloaded

 

Can anyone help ?

 

5 REPLIES 5
sbxkoenk
SAS Super FREQ

Hello ,

 

There are two types of score code that Model Studio nodes can create: DATA step or analytic store. To generate score code for an entire pipeline, the score code for each node producing score code is appended together into a single DATA step. When the nodes in a pipeline produce multiple analytic stores, or one or more analytic stores and DATA step score code, an EP score code file is created. EP score code represents the score code produced by these pipelines.

(the above is from : SAS Help Center: Scoring Your Models ... there is also a table that tells you which node produces what.)

You can run this code outside Model Studio.

For complex models, modeling logic may not be stored in a human-readable equation or series of rules but, rather, a machine-readable file. Common file type that may represent models include Pickle for Python models; Analytical store (ASTORE) for SAS models; and rdata, rds, or rda for R models. When the model is saved as an object it must be loaded before it can be used to score data.
(the above is from : Training code, scoring code, and what makes a model - The SAS Data Science Blog)

 

I guess you are looking for simple data step score code (without analytic stores) that you can take anywhere ... but you can't get full data step score code for complex models.


Ciao,

Koen

Serinac01
Calcite | Level 5
Yes 100% looking for more simple data step code that can run independent of sas Viya and rule set or json file etc can be moved to different environments for production
sbxkoenk
SAS Super FREQ
Hello ,
What's your destination platform / destination environment (where everything is deployed in production)?
Is your production environment still running SAS 9 ?
Ciao,
Koen
Serinac01
Calcite | Level 5
Yes would need a code to implement in a sort of SAS 9 environment where there is if else statements so the logic can be coded

I used a simple decision tree and downloading that score code still resulted in astore procedure
sbxkoenk
SAS Super FREQ

@Serinac01 wrote:
I used a simple decision tree and downloading that score code still resulted in astore procedure

Yes , a simple decision tree also has its score code in an astore binary object. 
As confirmed by the table on this page : SAS Help Center: Scoring Your Models
Linear, logistic and quantile regression (a.o.) produce data step score code.

 

You can make your decision tree with PROC HPSPLIT.

(the HP-prefix is for High-Performance , it's not a CAS-procedure but it works multi-threaded)
PROC HPSPLIT 

  • produces a file that contains SAS DATA step code for scoring new data

  • produces a file that contains node rules

You can integrate that PROC HPSPLIT in your Model Studio pipeline (SAS code node).

 

Ciao,

Koen

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 1567 views
  • 1 like
  • 2 in conversation