Skip to content

Commit c7484a6

Browse files
committed
lint
1 parent 94bd7e9 commit c7484a6

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

articles/machine-learning/concept-onnx.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: ONNX models
2+
title: ONNX Runtime and models
33
titleSuffix: Azure Machine Learning
44
description: Learn how using the Open Neural Network Exchange (ONNX) can help optimize inference of your machine learning models.
55
services: machine-learning
@@ -9,27 +9,25 @@ ms.topic: concept-article
99
ms.author: mopeakande
1010
author: msakande
1111
ms.reviewer: kritifaujdar
12-
ms.date: 09/27/2024
12+
ms.date: 09/30/2024
1313
#customer intent: As a data scientist, I want to learn about ONNX so I can use it to optimize the inference of my machine learning models.
1414
---
1515

1616
# ONNX and Azure Machine Learning
1717

1818
This article describes how the [Open Neural Network Exchange (ONNX)](https://onnx.ai) can help optimize the inference of your machine learning models. Inference or model scoring is the process of using a deployed model to generate predictions on production data.
1919

20-
Optimizing machine learning models for inference requires you to tune the model and the inference library to make the most of hardware capabilities. This task becomes complex if you want to get optimal performance on different kinds of platforms such as cloud, edge, CPU, or GPU, because each platform has different capabilities and characteristics. The complexity increases if you need to run models from various frameworks on different platforms. It can be time-consuming to optimize all the different combinations of frameworks and hardware.
20+
Optimizing machine learning models for inference requires you to tune the model and the inference library to make the most of hardware capabilities. This task becomes complex if you want to get optimal performance on different platforms such as cloud, edge, CPU, or GPU, because each platform has different capabilities and characteristics. The complexity increases if you need to run models from various frameworks on different platforms. It can be time-consuming to optimize all the different combinations of frameworks and hardware.
2121

22-
A useful solution is to train your model one time in your preferred framework and then run it anywhere on the cloud or edge. ONNX can help with this solution.
22+
A useful solution is to train your model one time in your preferred framework, and then export or convert it to ONNX so it can run anywhere on the cloud or edge. Microsoft and a community of partners created ONNX as an open standard for representing machine learning models. You can export or convert models from [many frameworks](https://onnx.ai/supported-tools) to the standard ONNX format. Supported frameworks include TensorFlow, PyTorch, scikit-learn, Keras, Chainer, MXNet, and MATLAB. You can run models in the ONNX format on various platforms and devices.
2323

24-
Microsoft and a community of partners created ONNX as an open standard for representing machine learning models. You can export or convert models from [many frameworks](https://onnx.ai/supported-tools), including TensorFlow, PyTorch, scikit-learn, Keras, Chainer, MXNet, and MATLAB, to the standard ONNX format. You can run models in the ONNX format on various platforms and devices.
24+
This ONNX flow diagram shows available frameworks and deployment options.
2525

26-
The following ONNX flow diagram shows available frameworks and deployment options.
27-
28-
:::image type="content" source="media/concept-onnx/onnx.png" alt-text="ONNX flow diagram showing training, converters, and deployment." lightbox="media/concept-onnx/onnx.png":::
26+
:::image type="content" source="media/concept-onnx/onnx.png" alt-text="ONNX flow diagram showing training, converters, and deployment." border="false" lightbox="media/concept-onnx/onnx.png":::
2927

3028
## ONNX Runtime
3129

32-
[ONNX Runtime](https://onnxruntime.ai) is a high-performance inference engine for deploying ONNX models to production. ONNX Runtime is optimized for both cloud and edge, and works on Linux, Windows, and MacOS. ONNX is written in C++, but also has C, Python, C#, Java, and JavaScript (Node.js) APIs for use in those environments.
30+
[ONNX Runtime](https://onnxruntime.ai) is a high-performance inference engine for deploying ONNX models to production. ONNX Runtime is optimized for both cloud and edge, and works on Linux, Windows, and macOS. ONNX is written in C++, but also has C, Python, C#, Java, and JavaScript (Node.js) APIs to use in those environments.
3331

3432
ONNX Runtime supports both deep neural networks (DNN) and traditional machine learning models, and it integrates with accelerators on different hardware such as TensorRT on Nvidia GPUs, OpenVINO on Intel processors, and DirectML on Windows. By using ONNX Runtime, you can benefit from extensive production-grade optimizations, testing, and ongoing improvements.
3533

@@ -48,11 +46,11 @@ You can obtain ONNX models in several ways:
4846
- Get a pretrained ONNX model from the [ONNX Model Zoo](https://github.com/onnx/models).
4947
- Generate a customized ONNX model from [Azure AI Custom Vision service](/azure/ai-services/custom-vision-service/).
5048

51-
You can represent many models as ONNX models, including image classification, object detection, and text processing models. If you can't convert your model successfully, file a GitHub issue in the repository of the converter you used.
49+
You can represent many models as ONNX, including image classification, object detection, and text processing models. If you can't convert your model successfully, file a GitHub issue in the repository of the converter you used.
5250

5351
## ONNX model deployment in Azure
5452

55-
You can deploy, manage, and monitor your ONNX models with Azure Machine Learning. Use the standard [MLOps deployment workflow](concept-model-management-and-deployment.md) with ONNX Runtime to create a REST endpoint hosted in the cloud.
53+
You can deploy, manage, and monitor your ONNX models in Azure Machine Learning. Using a standard [MLOps deployment workflow](concept-model-management-and-deployment.md#deploy-models-as-endpoints) with ONNX Runtime, you can create a REST endpoint hosted in the cloud.
5654

5755
## Python packages for ONNX Runtime
5856

@@ -65,7 +63,7 @@ pip install onnxruntime # CPU build
6563
pip install onnxruntime-gpu # GPU build
6664
```
6765

68-
To call ONNX Runtime in your Python script, use:
66+
To call ONNX Runtime in your Python script, use the following code:
6967

7068
```python
7169
import onnxruntime
@@ -74,7 +72,7 @@ session = onnxruntime.InferenceSession("path to model")
7472

7573
The documentation accompanying the model usually tells you the inputs and outputs for using the model. You can also use a visualization tool such as [Netron](https://github.com/lutzroeder/Netron) to view the model.
7674

77-
ONNX Runtime lets you query the model metadata, inputs, and outputs as follows:
75+
ONNX Runtime lets you query the model metadata, inputs, and outputs, as follows:
7876

7977
```python
8078
session.get_modelmeta()

0 commit comments

Comments
 (0)