Skip to content

Commit 6e2f1e5

Browse files
authored
Merge pull request #15149 from dphansen/davidph-predict-onnx
Updated PREDICT for ONNX
2 parents f339142 + 7de75de commit 6e2f1e5

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

docs/t-sql/queries/predict-transact-sql.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "PREDICT (Transact-SQL)"
33
ms.custom: ""
4-
ms.date: "05/11/2020"
4+
ms.date: "05/27/2020"
55
ms.prod: sql
66
ms.prod_service: "sql-database"
77
ms.reviewer: ""
@@ -33,7 +33,8 @@ For more information, see [Native scoring using the PREDICT T-SQL function](../.
3333
PREDICT
3434
(
3535
MODEL = @model | model_literal,
36-
DATA = object AS <table_alias>
36+
DATA = object AS <table_alias>
37+
[, RUNTIME = ONNX ]
3738
)
3839
WITH ( <result_set_definition> )
3940
@@ -52,7 +53,7 @@ MODEL = @model | model_literal
5253

5354
### Arguments
5455

55-
**model**
56+
**MODEL**
5657

5758
The `MODEL` parameter is used to specify the model used for scoring or prediction. The model is specified as a variable or a literal or a scalar expression.
5859

@@ -64,17 +65,16 @@ The model object can be created by using R or Python or another tool.
6465
[Open Neural Network Exchange (ONNX)](https://onnx.ai/get-started.html) is the supported model format for Azure Synapse.
6566
::: moniker-end
6667

67-
**data**
68+
**DATA**
6869

6970
The DATA parameter is used to specify the data used for scoring or prediction. Data is specified in the form of a table source in the query. Table source can be a table, table alias, CTE alias, view, or table-valued function.
7071

71-
<!-- This should likely be removed - TBD
72-
**parameters**
72+
**RUNTIME = ONNX**
7373

74-
The PARAMETERS parameter is used to specify optional user-defined parameters used for scoring or prediction.
74+
> [!IMPORTANT]
75+
> The `RUNTIME = ONNX` argument is only available in [Azure SQL Managed Instance](/azure/azure-sql/managed-instance/machine-learning-services-overview) and [Azure SQL Edge](/azure/sql-database-edge/onnx-overview).
7576
76-
The name of each parameter is specific to the model type. For example, the [rxPredict](https://docs.microsoft.com/machine-learning-server/r-reference/revoscaler/rxpredict) function in RevoScaleR supports the parameter `@computeResiduals`, which indicates whether residuals should be computed when scoring a logistic regression model. If you are calling a compatible model, you could pass that parameter name and a TRUE or FALSE value to the `PREDICT` function.
77-
-->
77+
Indicates the machine learning engine used for model execution. The `RUNTIME` parameter value is always `ONNX`.
7878

7979
**WITH ( <result_set_definition> )**
8080

@@ -99,12 +99,15 @@ The `PREDICT` function is supported in all editions of SQL Server 2017 or later,
9999

100100
### Supported algorithms
101101

102-
::: moniker range=">=sql-server-2017||=azuresqldb-current||>=sql-server-linux-2017||=azuresqldb-mi-current||=sqlallproducts-allversions"
102+
::: moniker range=">=sql-server-2017||=azuresqldb-current||>=sql-server-linux-2017||=sqlallproducts-allversions"
103103
The model that you use must have been created using one of the supported algorithms from the RevoScaleR package. For a list of currently supported models, see [Real-time scoring](../../machine-learning/real-time-scoring.md).
104104
::: moniker-end
105105
::: moniker range="=azure-sqldw-latest||=sqlallproducts-allversions"
106106
Algorithms that can be converted to [ONNX](https://onnx.ai/) model format are supported.
107107
::: moniker-end
108+
::: moniker range="=azuresqldb-mi-current||=sqlallproducts-allversions"
109+
Algorithms that can be converted to [ONNX](https://onnx.ai/) model format and models that you have been created using one of the supported algorithms from the RevoScaleR package are supported.
110+
::: moniker-end
108111

109112
### Permissions
110113

0 commit comments

Comments
 (0)