Hello,
I want to score a table using the astore code derived from SAS Visual TA in SAS VFL. What shuld i put in the following paramters (let cas_server_port, cas_server_hostname)?
Thanks,
Andreas
%let cas_server_hostname = "localhost";
%let cas_server_port = 5570;
Hi @azaras and @sbxkoenk ,
I don't think you need epcode in this environment. You can just run the AstoreScoreCode.sas after setting some of the macro variables. Directions are in the file itself. Can you give that a try, @azaras ? Thanks
Russ
Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
Hello,
I guess :
So, I moved this topic to "Data Science"-board (more appropriate board for this question).
I suppose "Model Studio" (for VTA) was used here, and not "Visual Analytics".
BR, Koen
I use the code at the end of the post.
I receive the following error:
Any hints on how to score?
%let input_caslib_name = "{CASUSER}";
%let input_table_name = "{ASRS}";
%let copy_vars_variable = "{'docID', 'ID','Text', 'Target05'}";
%let output_caslib_name = "{CASUSER}";
%let output_documents_table_name = "SCORED_TA";
%let input_astore_caslib_name = "Analytics_Project_1bcf9786-5598-4242-a05c-8f6093fc9373";
%let input_astore_name = "53a5b832-c925-4ee9-b641-8a50f3226aae_TEXT_MODEL";
%let cas_server_hostname = "pdcesx23103.exnet.sas.com";
%let cas_server_port = 5570;
cas sascas1 host=&cas_server_hostname port=&cas_server_port;
libname sascas1 cas sessref=sascas1 datalimit=all;
proc cas;
session sascas1;
loadactionset "astore";
action astore.score;
param
table={caslib=&input_caslib_name, name=&input_table_name}
rstore={caslib=&input_astore_caslib_name, name=&input_astore_name}
out={caslib=&output_caslib_name, name=&output_documents_table_name, replace=TRUE}
copyVars={©_vars_variable};
;
run;
quit;
Have you carefully followed the steps outlined here?
BR, Koen
Hi,
I read the instructions. I had forgotten to upload the astore table in cas.
I did it with the following proc:
%let local_astore_file_path = "/shared/home/azaras@aueb.gr/casuser";
%let input_astore_caslib_name = "casuser";
%let input_astore_name = "astore_2";
%let input_astore_name_unquoted = %qsysfunc(dequote(&input_astore_name))
proc astore;
upload rstore=public.&input_astore_name_unquoted
store=&local_astore_file_path;
quit;
The astore_2 is created in public. When i try to open it in the data grid i get the following:
I continue with the action astore score but since the uploaded into cas astore table has a problem there the code cannot run.
Any ideas what is the problem?
Thanks in advance,
Andreas
Hello,
How do you know there's a problem with the uploaded-into-CAS ASTORE?
That ASTORE is a binary analytic store. You cannot visualize it with the table viewer.
What happens when you try to use that ASTORE for scoring?
BR, Koen
Hi Koen,
Thanks for your answer.
When i try to score with the created astore cas table i receive the following error:
Hello,
Can you try something like this?
For Scoring new data from SAS Studio using score files (DS2 code and an ASTORE binary file) from VTA pipelines :
Q: How can we score new data in SAS Studio using EP code files downloaded from Model Studio?
**ANSWER**
If you downloaded the ASTORE (.sasast) then you need to upload it to CAS to use in scoring. The epcode is used if you have preprocessing code in your flow. If the ASTORE file is already loaded to CAS, you do not need to upload it again.
proc astore;
upload rstore=mycaslib._astore_wine
store="~/aBc/xYz/Demo/_36AAV34SH5MWA1ASPCRW1AYAD.sasast";
/* the astore that you downloaded from Model Studio */
score data=mycaslib.winequality_jw out=mycaslib._scored_wine3
rstore=mycaslib._astore_wine
epcode="~/aBc/xYz/Demo/dmcas_epscorecode.sas";
/* the epcode that was downloaded from Model Studio */
run; QUIT;
BR, Koen
Hello @smanoj ,
Hello @themaryosborne ,
Hello @RussAlbright ,
Can you help?
I can probably sort it out by setting up a VTA-pipeline myself, but I have no time for that right now.
Thanks,
Koen
Hi @azaras and @sbxkoenk ,
I don't think you need epcode in this environment. You can just run the AstoreScoreCode.sas after setting some of the macro variables. Directions are in the file itself. Can you give that a try, @azaras ? Thanks
Russ
Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
Thnaks Russ and all the friends that contributed to my question.
You were right, i checked carefully the code that is downloaded from the SAS Visual Text Analytics and i can score a new data set by filling in the macro variables. Actually the scored data set is saved in a cas library called sascas1 that is created by the code, although i set the library to casuser. This is why i could not find the scored data set and i initiated the post. So if someone else tries this action the scored data set can be found in the sascas1 cas library.
/* specifies the CAS library to write the score output table. You must modify the value to provide the name of the library that will contain the output table that the score code produces. */
%let output_caslib_name = "casuser";
cas sascas1 host=&cas_server_hostname port=&cas_server_port;
libname sascas1 cas sessref=sascas1 datalimit=all;
Thanks!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.