astore

extract

Description

Extracts the saved ONNX blob from a remote saved ONNX store. This action allows you to retrieve binary ONNX model data that has been previously saved into a CAS table, facilitating model portability and external deployment.

Settings
ParameterDescription
rstoreSpecifies the binary table that contains the analytic store to be extracted. This parameter is required.
caslibSpecifies the caslib for the input table. If omitted, the active caslib is used.
nameSpecifies the name of the input table containing the analytic store.
whereTableSpecifies an input table that contains rows to use as a WHERE filter. This allows for selective extraction based on keys or specific criteria defined in the filter table.
varsSpecifies the variable names to use from the filter table (within whereTable) to identify matching rows.
whereSpecifies an expression for subsetting the data from the filter table (within whereTable).
Data Preparation View data prep sheet
Data Setup for Extraction

Load a sample ONNX analytic store table into CAS for demonstration purposes.

Copied!
1 
2PROC CAS;
3astore.upload / rstore={name="onnx_store", caslib="casuser"} path="/path/to/model.onnx";
4 
5RUN;
6 

Examples

Extracts the content of an ONNX store table named 'onnx_store'.

SAS® / CAS Code Code awaiting community validation
Copied!
1 
2PROC CAS;
3astore.extract / rstore={name="onnx_store", caslib="casuser"};
4 
5RUN;
6 
Result :
The action extracts the binary blob from the specified table.

Extracts specific ONNX data using a secondary table 'filter_keys' to filter the rows in the store.

SAS® / CAS Code Code awaiting community validation
Copied!
1 
2PROC CAS;
3astore.extract / rstore={name="multi_model_store", caslib="public", whereTable={name="filter_keys", caslib="casuser", where="model_id=1"}};
4 
5RUN;
6 
Result :
The action extracts only the ONNX blob(s) corresponding to the rows identified by the 'filter_keys' table where model_id is 1.

FAQ

What is the primary purpose of the extract action?
Which parameter is mandatory for the extract action?
How can I filter the data used in the analytic store?
What details must be provided within the 'rstore' parameter?