sng4onnx
A simple tool that automatically generates and assigns an OP name to each OP in an old format ONNX file.
What it is and what it does
sng4onnx is a lightweight command-line and Python utility that solves a specific ONNX workflow problem: older ONNX model files sometimes lack proper operation names, making them harder to inspect, debug, or process. This tool automatically traverses an ONNX graph and generates systematic names for any unnamed operators, then writes the corrected model back to disk or returns it as a Python object.
The package works both as a CLI tool (via `sng4onnx` command) and as an importable Python function. It requires only Python 3.6 or later and has no external runtime dependencies beyond what ONNX itself needs. The tool is part of a broader collection of simple ONNX processing utilities and is maintained actively.
Use it for:
- Prepare legacy ONNX models for inspection or visualization by ensuring all operators have readable names
- Preprocess ONNX files before feeding them into model analysis or debugging tools that expect named operations
- Batch-convert a collection of old-format ONNX models to have consistent operation naming conventions
- Integrate into an ONNX model pipeline to normalize graph structure before downstream processing
- Verify and repair ONNX files exported from older frameworks or converters that may not name all operations
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Automatically generates and assigns operation names to unnamed operators in ONNX model files, converting old-format ONNX graphs to have properly named operations.
Yes. Install if you work with ONNX models and need to normalize operation names in older or unconventionally formatted files. The tool is lightweight, actively maintained, has no complex dependencies, carries a permissive MIT license, and solves a real ONNX workflow problem. No security vulnerabilities are known.
Install
sng4onnx on PyPI
pip
pip install sng4onnxuv
uv add sng4onnxpoetry
poetry add sng4onnxInstalling sng4onnx
Before you install
Low install friction with no runtime dependencies. Actively maintained as of 2026-02-24 with recent updates.
License in practice
MIT License permits unrestricted use, modification, and distribution with minimal restrictions.
Quickstart
pip install sng4onnx
from sng4onnx import generate
onnx_graph = generate(
input_onnx_file_path="model.onnx",
output_onnx_file_path="model_renamed.onnx"
)
Verify before relying
- Whether the tool handles all ONNX operator types or only a subset
- Performance characteristics on large models with thousands of operations
- Compatibility with ONNX versions beyond the current release
Package facts
| License | MIT License (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 171 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 307,157/month — #7,779 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sng4onnx-2.0.1-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
sam4onnxRewrites attributes and constants in ONNX model…
permissive · top 15,000 on PyPI
scc4onnxConverts ONNX model input tensor dimensions and…
permissive · top 15,000 on PyPI
sna4onnxAdds new operations (nodes) to ONNX model…
permissive · top 15,000 on PyPI
snc4onnxMerges multiple ONNX neural network models into…
permissive · top 15,000 on PyPI
sog4onnxGenerates minimal ONNX operation graphs by…
permissive · top 15,000 on PyPI
sor4onnxRenames input, output, and operator nodes in…
permissive · top 15,000 on PyPI
sod4onnxsod4onnx removes specified output operations…
permissive · top 15,000 on PyPI
snd4onnxRemoves specified nodes from ONNX model graphs…
permissive · top 15,000 on PyPI
svs4onnxSwaps connections between output and input…
permissive · top 15,000 on PyPI
soc4onnxChanges the opset version of an ONNX model…
permissive · top 15,000 on PyPI