--- id: sor4onnx version: "1.0.7" license: MIT License license_treatment: permissive maintenance: dormant --- # sor4onnx — Simple OP Renamer for ONNX. License: permissive · Maintenance: dormant · Downloads: 83.1K/mo ## 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 above — 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 pip install sor4onnx uv add sor4onnx 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_current - Install friction: low - Maintenance: dormant - Downloads: 83.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags onnx node renaming, rename onnx operators, onnx model editing, onnx graph transformation, batch rename onnx nodes, onnx input output renaming, onnx op name replacement, onnx-tools, model-preprocessing [View on SkillFed](https://skillfed.io/packages/sor4onnx) · [View on PyPI](https://pypi.org/project/sor4onnx/)