I am doing object detection for PPE and I have Jupyter code that requires the input(images/annotations) to be in Sashdat format. I don't have much experience with CAS tables and caslibs but I do know CAS tables can be converted into the SASHdat format. So right now I am stuck with creating the CAS table and caslibs, I do not know how to generate them. Any help will be very much appreciated.
Link to code:
@crack3n-collab wrote:
So based on what you have said. Am I right to say I need to first set up a CASlib and a CAS table to get sashdat? Do you know of any Python code to convert a cas table to sashdat?
The data you work with is the CAS in-memory table. The .sashdat file is just the file in the backing store - and you could also use another format like parquet.
For CAS using .sashdat has advantages when it comes to loading because .sashdat is memory-mapped.
See if the info under below two links give you more guidance.
Looking into the code under the link you've shared it appears what you get as source in a zip file are .sashdat files. The instructions and code then show you how to load this .sashdat file into CAS.
CAS tables are in-memory tables. Caslib's point to such in-memory tables. A Caslib has always two legs: The in-memory table and a backing store that points to a physical location.
What you need to do is to store the unzipped .sashdat files under a physical location accessible to your CAS session and then use this path for the caslib definition as the backing store (path=...).
You then load the CAS table from the backing store.
I'm not really sure which example you're doing but it looks to me the instructions given are very detailed so just read and follow them carefully.
Hi Patrick, thanks for the reply. I am doing the simple object detection example but I using a different set of model data. I have the images and annotation but the input file format in the code appears to require the .sashdat format.
CAS allows to use a big variety of source data (the physical leg). You just need to define it the right way.
In your sample code here the place where you define the caslib and where you likely need to amend the code.
CAS action table.addcaslib() is documented here.
Once your caslib is correct you can load the data from the define backing store into CAS. You will of course again have to amend the sample code so it's suitable for your actual physical data.
CAS action table.loadTable is documented here.
And here the link to the CAS table action set.
If it was me then I'd first get these CAS actions working using SAS Studio with Proc CAS and only then integrate the already working and tested code into the Python script.
So based on what you have said. Am I right to say I need to first set up a CASlib and a CAS table to get sashdat? Do you know of any Python code to convert a cas table to sashdat?
I found this SAS code on github but I am quite sure how I access it if I were do it on SAS Viya since I need the .sashdat file in jupyter hub. I can't download the .sashdat file because I am using a trial environment.
@crack3n-collab wrote:
So based on what you have said. Am I right to say I need to first set up a CASlib and a CAS table to get sashdat? Do you know of any Python code to convert a cas table to sashdat?
The data you work with is the CAS in-memory table. The .sashdat file is just the file in the backing store - and you could also use another format like parquet.
For CAS using .sashdat has advantages when it comes to loading because .sashdat is memory-mapped.
See if the info under below two links give you more guidance.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!