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
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?
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
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.
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
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.
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.
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.
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
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.