- By Query - An ML model can be queried, where the inference is returned as the result set.
- By Execution - An ML model can be run with the
EXECUTE FUNCTIONcommand, where the inference is persisted to a specified table.
EVALUATE_MODEL Table Function Syntax
EVALUATE_MODEL EXECUTE FUNCTION Syntax
Parameters
MODEL
MODEL
Name of the ML model on which to run an inference
DEPLOYMENT_MODE
DEPLOYMENT_MODE
Scheme used in making inferences on the ML model:
-
BATCH- inference tests are run against a batch of data in an existing table all at once -
CONTINUOUS- inference tests are run automatically against records being streamed into an input table; inference results are inserted into an output table, which will be updated upon each subsequent inferenceContinuous deployment mode is only available when using theEXECUTE FUNCTIONsyntax, as it creates a destination table with the continuously updated results.
REPLICATIONS
REPLICATIONS
The number of replicas to launch on Kubernetes
SOURCE_TABLE
SOURCE_TABLE
Table or query to use as input to the ML model, specified with either of these two forms:
-
INPUT_TABLE(<table name>)- Use the given table or view as input; e.g.: -
INPUT_TABLE(<query>)- Use the given query as input; e.g.:
DESTINATION_TABLE
DESTINATION_TABLE
Only applicable when using
EXECUTE FUNCTION syntax. Name of the table in which to store the
results of the inference, in [schema_name.]table_name format, using standard
name resolution rules and meeting
table naming criteriaExamples
EVALUATE_MODEL Table Function Example
EVALUATE_MODEL EXECUTE FUNCTION Example