--- id: soa4onnx version: "1.0.5" license: MIT License license_treatment: permissive maintenance: aging --- # soa4onnx — Simple model output OP additional tools. License: permissive · Maintenance: aging · Downloads: 84.1K/mo ## What it is and what it does soa4onnx is a lightweight utility for modifying ONNX model graphs by designating intermediate operations as model outputs. It works by taking an existing ONNX file and a list of operation names, then rewiring the graph so those operations become exposed outputs that can be queried independently. This is useful when you want to extract intermediate layer activations or debug specific computation stages without retraining or restructuring the model. The package offers both a command-line interface and a Python API (outputs_add function). It requires only Python 3.6+ and has no external runtime dependencies, making it straightforward to integrate into model processing pipelines. The tool includes optional type checking and verbosity control for integration into automated workflows. Use it for: - Extract intermediate layer outputs from a trained model for visualization or analysis without model retraining - Debug ONNX graphs by exposing internal node outputs to inspect computation at specific stages - Prepare models for multi-output inference where only certain intermediate results are needed - Adapt pre-trained models to new downstream tasks by exposing different layer outputs as model endpoints ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Adds or modifies output nodes in ONNX model graphs, allowing you to expose intermediate layer outputs as model endpoints via CLI or Python API. Yes, if you work with ONNX models and need to expose intermediate outputs. The package is lightweight, has no dependencies, and carries permissive licensing. However, maintenance is aging (last release 314 days ago), so verify compatibility with your ONNX runtime version before relying on it in production pipelines. ## Install pip install soa4onnx uv add soa4onnx poetry add soa4onnx ## Installing soa4onnx Before you install: Low friction; pure Python wheel with no runtime dependencies. Maintenance is aging—last release was 314 days ago—but the repository is active and not archived. License in practice: MIT License permits commercial and private use with minimal restrictions; you must retain the license notice in distributions. Quickstart: pip install soa4onnx from soa4onnx import outputs_add onnx_graph = outputs_add( input_onnx_file_path="model.onnx", output_op_names=["onnx::Gather_76", "onnx::Add_89"], output_onnx_file_path="model_added.onnx" ) Verify before relying: - Whether the package handles complex ONNX opset versions or only specific versions - Performance characteristics when working with very large models or many output nodes - Compatibility with recent ONNX runtime versions beyond what the fact sheet indicates ## Package facts - License: MIT License (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 84.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags onnx model output modification, expose intermediate onnx layers, onnx graph output editing, add outputs to onnx model, onnx node extraction tool, intermediate layer extraction onnx, onnx-tools, model-debugging [View on SkillFed](https://skillfed.io/packages/soa4onnx) · [View on PyPI](https://pypi.org/project/soa4onnx/)