BookmarkSubscribeRSS Feed
1dsspntdSSsr
Calcite | Level 5

I want to reference a model that exists in mu modelStore library but I can't get it to work. I'm using the model name taken from model manager AstoreMetadata.json as shown on the picture below. The code I'm trying is shown below the picture.

Viya version 2021.2

Release 20220317

deleteme.png

 

proc gradboost data = caslib.casdata
	inmodel=ModelStore.modelname noprint;
	output out=caslib._scored_gbm;
run;

proc astore;
   score data=caslib.dataset
         rstore=ModelStore.modelname
         out=caslib.astore_out;
quit;

The error I get is that modelStore has more than 8 characters.

 

Is there a way to reference the model saved in ModelStore to score data?

8 REPLIES 8
sbxkoenk
SAS Super FREQ

Hello,

 

You can have CASLIBs with a name exceeding 8 characters in length, but it's not very practical !

See here :

CASLIB= data set option for caslibs longer than 8 characters
Posted 07-16-2020 03:12 AM (1645 views)
https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-character...

 

Good luck,

Koen 

1dsspntdSSsr
Calcite | Level 5

Thank you for your suggestion. ModelStore is a default caslib, I wouldn't have created a libname that is obscurely supported but the SAS folks thought this was somehow helpful.

 

In any case, I had seen the post you referenced and that option doesn't work on what I'm intending to do. That is why I shared my code. I'd appreciate if suggestions are not just a quick google search but a thought out and tried response. I have done the google searches already.

sbxkoenk
SAS Super FREQ

OK.

You can always reach out to SAS Technical Support in your country if the "communities" do not help you fast enough or well enough.

 

SAS complains about exceeding 8 positions, but I am wondering if the underlying reason is not << 'ModelStore' not being known as CASLIB >>.

See :

Add ModelStore and ModelPerformanceData Caslibs to a CAS Server
https://go.documentation.sas.com/doc/en/calcdc/3.5/calmodels/n0r9qvpxhghjpsn149zfmh0h7qwi.htm#n0t6wx...

 

Good luck,
Koen

1dsspntdSSsr
Calcite | Level 5
Thank you again for your reply. As the picture I posted shows the model is already registered in the ModelStore caslib. Thus showing that ModelStore is in fact a caslib and that I had access as I registered the model there.
LinusH
Tourmaline | Level 20

According to the documentation, RSTORE points to a CAS libref, I'm missing a libname statement in your code.

As @sbxkoenk states you can have CASlibs with longer names than 8 chars, but SAS librefs are limited to 8 chars.

Data never sleeps
1dsspntdSSsr
Calcite | Level 5

Same response as above as your suggestion was already placed.

Thank you for your suggestion. ModelStore is a default caslib, I wouldn't have created a libname that is obscurely supported but the SAS folks thought this was somehow helpful.

 

In any case, I had seen the post you referenced and that option doesn't work on what I'm intending to do. That is why I shared my code. I'd appreciate if suggestions are not just a quick google search but a thought out and tried response. I have done the google searches already.

WendyCzika
SAS Employee

I think you want to do this:

libname mycas cas caslib=ModelStore;

Then use mycas where you have caslib and ModelStore in the proc gradboost/astore calls. 

sbxkoenk
SAS Super FREQ

Thanks @WendyCzika .

It's probably as simple as that indeed. This is one to remember !

 

@1dsspntdSSsr : I hope you haven't given up yet and that this suggestion / solution will still come in handy.

 

Thanks,

Koen

SAS Innovate 2025: Call for Content

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 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 8 replies
  • 1614 views
  • 2 likes
  • 4 in conversation