Machine learning and AI with ONNX in SQL Edge

Important

Azure SQL Edge no longer supports the ARM64 platform.

Machine learning in Azure SQL Edge supports models in the Open Neural Network Exchange (ONNX) format. ONNX is an open format you can use to interchange models between various machine learning frameworks and tools.

Overview

To infer machine learning models in Azure SQL Edge, you first need to get a model. This can be a pretrained model or a custom model trained with your framework of choice. Azure SQL Edge supports the ONNX format and you need to convert the model to this format. There should be no effect on model accuracy, and once you have the ONNX model, you can deploy the model in Azure SQL Edge and use native scoring with the PREDICT T-SQL function.

Get ONNX models

To obtain a model in the ONNX format:

Limitations

Currently, not all ONNX models are supported by Azure SQL Edge. The support is limited to models with numeric data types:

Other numeric types can be converted to supported types by using CAST and CONVERT.

The model inputs should be structured so that each input to the model corresponds to a single column in a table. For example, if you're using a pandas dataframe to train a model, then each input should be a separate column to the model.

Next steps