Use PL/SQL Packages to Import Models
Use the DBMS_DATA_MINING.IMPORT_ONNX_MODEL procedure or
the DBMS_VECTOR.LOAD_ONNX_MODEL procedure to import ONNX format models. You
can then use the imported ONNX format models through a scoring function run by the
in-database ONNX Runtime.
- To import a pretrained ONNX format model, use IMPORT_ONNX_MODEL Procedure or LOAD_ONNX_MODEL Procedure.
- To drop an ONNX model, use DROP_ONNX_MODEL. See also DROP_MODEL procedure.
- A complete step-by-step example that illustrates these procedures is in Import ONNX Models and Generate Embeddings.
Note:
In-database embedding models must include tokenization and postprocessing. Providing only the core ONNX model is insufficient, as users would need to handle tokenization externally, pass tensors into the SQL operator, and convert output tensors into vectors.
DBMS_DATA_MINING.RENAME_MODEL procedure is also
supported.
Most of the existing Oracle Machine Learning for SQL APIs are available to the ONNX models. As partitioning is not applicable for external pretrained models, ONNX models do not support the following procedures:
ADD_PARTITIONDROP_PARTITIONADD_COST_MATRIXREMOVE_COST_MATRIX
Related Topics