skillfed

sor4onnx

Simple OP Renamer for ONNX.

sor4onnx v1.0.7 83.1K downloads/30d#14,100 on PyPI5
Permissive license MIT License DORMANT released

What it is and what it does

sor4onnx is a lightweight utility for renaming nodes in ONNX model files. It provides both a command-line interface and a Python API to perform string-based replacements on input names, output names, and operator names within an ONNX graph. The tool supports four matching strategies—exact, partial, prefix, and suffix—and can target all nodes or restrict changes to inputs or outputs only.

The package is designed for model preprocessing workflows where node names need to be standardized, cleaned up, or adapted for downstream tools. It reads an ONNX file or graph object, applies the specified string transformations, and outputs the modified model. With no external runtime dependencies, it installs quickly and integrates easily into Python scripts or shell pipelines.

Use it for:

  • Strip namespace prefixes (e.g., 'onnx::') from operator names before deployment to inference engines.
  • Rename model inputs and outputs to match expected interface names in production systems.
  • Batch-rename nodes matching a pattern (prefix or suffix) to standardize naming conventions across a model zoo.
  • Prepare ONNX models exported from different frameworks by normalizing node nomenclature.
  • Integrate model transformation into CI/CD pipelines via CLI for automated preprocessing.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Renames input, output, and operator nodes in ONNX model files using string matching (exact, partial, prefix, or suffix) via CLI or Python API.

Yes, if you need to rename ONNX nodes. The package is lightweight, has no dependencies, and carries permissive licensing. However, maintenance is dormant (last update 808 days ago), so verify compatibility with your ONNX version before relying on it in production. For one-off renaming tasks or model preprocessing, it is a practical choice.

Install

sor4onnx on PyPI

pip

pip install sor4onnx

uv

uv add sor4onnx

poetry

poetry add sor4onnx

Installing sor4onnx

Before you install

Low friction; pure Python wheel with no runtime dependencies. Maintenance is dormant—last release 808 days ago—but the package is stable and archived status is false, suggesting it remains available.

License in practice

MIT License permits commercial and private use with minimal restrictions, making it safe to integrate into most projects.

Quickstart

pip install sor4onnx

from sor4onnx import rename

onnx_graph = rename(
  old_new=["onnx::", ""],
  input_onnx_file_path="model.onnx",
  output_onnx_file_path="model_renamed.onnx",
  search_mode="prefix_match"
)

Verify before relying

  • Whether the package works correctly with current ONNX versions (last tested or verified version not stated in fact sheet).
  • Performance characteristics when renaming large graphs or handling many simultaneous replacements.

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 dormant — 808 days since the last release
Last repo commit
First released
Downloads 83,107/month — #14,100 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: sor4onnx-1.0.7-py3-none-any.whl

Tags

onnx node renamingrename onnx operatorsonnx model editingonnx graph transformationbatch rename onnx nodesonnx input output renamingonnx op name replacement
onnx-toolsmodel-preprocessing

More Artificial Intelligence packages