Adapter for ai-edge-model-explorer to support ONNX models
Project description
Model Explorer ONNX Adapter
ONNX Adapter for google-ai-edge/model-explorer
Installation
pip install --upgrade model-explorer-onnx
Usage
model-explorer --extensions=model_explorer_onnx
# Or as a shortcut
onnxvis
# Supply model path
onnxvis model.onnx
[!NOTE] Model Explorer only supports WSL on Windows.
Read more on the Model Explorer User Guide.
Notes on representation
Graph input/output/initializers in ONNX are values (edges), not nodes. A node is displayed here for visualization. Graph inputs that are initialized by initializers are displayed as InitializedInput, and are displayed closer to nodes that use them.
Color Themes
Get node color themes here
Visualizing PyTorch ONNX exporter (dynamo=True) accuracy results
[!NOTE]
verify_onnx_programrequires PyTorch 2.7 or newer
import torch
from torch.onnx.verification import verify_onnx_program
from model_explorer_onnx.torch_utils import save_node_data_from_verification_info
# Export the and save model
onnx_program = torch.onnx.export(model, args, dynamo=True)
onnx_program.save("model.onnx")
verification_infos = verify_onnx_program(onnx_program, compare_intermediates=True)
# Produce node data for Model Explorer for visualization
save_node_data_from_verification_info(
verification_infos, onnx_program.model, model_name="model"
)
You can then use Model Explorer to visualize the results by loading the generated node data files:
onnxvis model.onnx --node_data_paths=model_max_abs_diff.json,model_max_rel_diff.json
Screenshots
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file model_explorer_onnx-0.3.7.tar.gz.
File metadata
- Download URL: model_explorer_onnx-0.3.7.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ad6a770e8e1ec25b57b68ec415e8f46f4e0edd6da640e1d756ab0788b00004a
|
|
| MD5 |
59db0644d0d25c137e69830e8d8961cc
|
|
| BLAKE2b-256 |
b28464c72cc24e90f19c25b12eaf5d53151ab92744bdcda063940711ed6e58b7
|
Provenance
The following attestation bundles were made for model_explorer_onnx-0.3.7.tar.gz:
Publisher:
main.yaml on justinchuby/model-explorer-onnx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
model_explorer_onnx-0.3.7.tar.gz -
Subject digest:
3ad6a770e8e1ec25b57b68ec415e8f46f4e0edd6da640e1d756ab0788b00004a - Sigstore transparency entry: 585860771
- Sigstore integration time:
-
Permalink:
justinchuby/model-explorer-onnx@eec1d8b5c58e236ebe4f648123392d4e0bb9dcaa -
Branch / Tag:
refs/tags/v0.3.7 - Owner: https://github.com/justinchuby
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yaml@eec1d8b5c58e236ebe4f648123392d4e0bb9dcaa -
Trigger Event:
push
-
Statement type:
File details
Details for the file model_explorer_onnx-0.3.7-py3-none-any.whl.
File metadata
- Download URL: model_explorer_onnx-0.3.7-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a1e8c059d1c7a92b493c200144f81ab4399dffa2d5c27d56c9a4a54b20a0aae
|
|
| MD5 |
f428b70178ade98db133d07e92e7ab09
|
|
| BLAKE2b-256 |
5efa6e0ffc5891515fcd6ff59e991472d317384211a83b443e554c8e966fba2c
|
Provenance
The following attestation bundles were made for model_explorer_onnx-0.3.7-py3-none-any.whl:
Publisher:
main.yaml on justinchuby/model-explorer-onnx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
model_explorer_onnx-0.3.7-py3-none-any.whl -
Subject digest:
5a1e8c059d1c7a92b493c200144f81ab4399dffa2d5c27d56c9a4a54b20a0aae - Sigstore transparency entry: 585860777
- Sigstore integration time:
-
Permalink:
justinchuby/model-explorer-onnx@eec1d8b5c58e236ebe4f648123392d4e0bb9dcaa -
Branch / Tag:
refs/tags/v0.3.7 - Owner: https://github.com/justinchuby
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yaml@eec1d8b5c58e236ebe4f648123392d4e0bb9dcaa -
Trigger Event:
push
-
Statement type: