CREATE FUNCTION#

CREATE FUNCTION#

To register an user-defined function, specify the implementation details of the function.

CREATE FUNCTION IF NOT EXISTS FastRCNNObjectDetector
INPUT  (frame NDARRAY UINT8(3, ANYDIM, ANYDIM))
OUTPUT (labels NDARRAY STR(ANYDIM), bboxes NDARRAY FLOAT32(ANYDIM, 4),
        scores NDARRAY FLOAT32(ANYDIM))
TYPE  Classification
IMPL  'evadb/functions/fastrcnn_object_detector.py';

CREATE FUNCTION via Type#

CREATE [OR REPLACE] FUNCTION [IF NOT EXISTS] function_name
[ FROM ( select ) ]
TYPE function_type
[ parameter [ ...] ]

Where the parameter is key value pair.

Warning

For one CREATE FUNCTION query, we can specify OR REPLACE or IF NOT EXISTS or neither, but not both.

Note

Go over HuggingFace Models, Model Training with Ludwig, and Time Series Forecasting to check examples for creating function via type.