Skip to content

Latest commit

 

History

History
77 lines (59 loc) · 2.58 KB

tutorial-run-ml-model-on-sql-edge.md

File metadata and controls

77 lines (59 loc) · 2.58 KB
titledescriptionauthorms.authorms.reviewerms.datems.servicems.topic
Deploy ML model on Azure SQL Edge using ONNX
In part three of this three-part Azure SQL Edge tutorial for predicting iron ore impurities, you'll run the ONNX machine learning models on SQL Edge.
kendalvandyke
kendalv
randolphwest
09/21/2024
azure-sql-edge
tutorial

Deploy ML model on Azure SQL Edge using ONNX

[!INCLUDE retirement-notice]

Note

Azure SQL Edge no longer supports the ARM64 platform.

In part three of this three-part tutorial for predicting iron ore impurities in Azure SQL Edge, you'll:

  1. Use Azure Data Studio to connect to SQL Database in the Azure SQL Edge instance.
  2. Predict iron ore impurities with ONNX in Azure SQL Edge.

Key components

  1. The solution uses a default 500 milliseconds between each message sent to the Edge Hub. This can be changed in the Program.cs file

    TimeSpanmessageDelay=configuration.GetValue("MessageDelay",TimeSpan.FromMilliseconds(500));
  2. The solution generated a message, with the following attributes. Add or remove the attributes as per requirements.

    { timestampcur_Iron_Feedcur_Silica_Feedcur_Starch_Flowcur_Amina_Flowcur_Ore_Pulp_pHcur_Flotation_Column_01_Air_Flowcur_Flotation_Column_02_Air_Flowcur_Flotation_Column_03_Air_Flowcur_Flotation_Column_04_Air_Flowcur_Flotation_Column_01_Levelcur_Flotation_Column_02_Levelcur_Flotation_Column_03_Levelcur_Flotation_Column_04_Levelcur_Iron_Concentrate }

Connect to the SQL Database in the Azure SQL Edge instance to train, deploy, and test the ML model

  1. Open Azure Data Studio.

  2. In the Welcome tab, start a new connection with the following details:

    FieldValue
    Connection typeMicrosoft SQL Server
    ServerPublic IP address mentioned in the VM that was created for this demo
    Usernamesa
    PasswordThe strong password that was used while creating the Azure SQL Edge instance
    DatabaseDefault
    Server groupDefault
    Name (optional)Provide an optional name
  3. Select Connect.

  4. In the File section, open /DeploymentScripts/MiningProcess_ONNX.jpynb from the folder in which you cloned the project files on your machine.

  5. Set the kernel to Python 3.

Related content

close