{"categories":[{"label":"Artificial Intelligence","url":"https://skillfed.io/packages/category/scientific-engineering-artificial-intelligence/2"}],"enrichment":{"capability":"Write ONNX functions and models in Python syntax, then convert them to ONNX graphs; includes tools for optimization and pattern-based graph rewriting.","skillfed_tags":["onnx-tooling","model-optimization","graph-rewriting"],"use_cases":["Author ONNX functions in readable Python instead of manually constructing protobuf graphs.","Debug ONNX model logic by running functions in eager mode to inspect intermediate tensor values.","Optimize ONNX models by applying constant folding and dead code elimination automatically.","Rewrite ONNX graph patterns (e.g., replace a custom Erf-based GELU with a native Gelu operator).","Round-trip between Python ONNX Script and ONNX graphs for model inspection and modification."],"what_it_does":"ONNX Script is a Python-to-ONNX compiler that lets you define ONNX functions and models using Python syntax decorated with the @script decorator. The decorator parses your Python code, traverses its abstract syntax tree, and builds an equivalent ONNX graph that can be saved and validated. It supports a subset of Python\u2014not the full language\u2014and includes eager-mode evaluation for debugging, where functions execute using ONNX Runtime as a shim to test intermediate results.\n\nBeyond compilation, the package provides an ONNX Optimizer (constant folding, dead code elimination) and an ONNX Rewriter (pattern-based graph transformation using user-defined rules). The rewriter allows you to match subgraph patterns and replace them with optimized alternatives. All of this is built on top of onnx and onnx_ir, with support for modern Python versions (3.9 through 3.14).","worth_installing":"Yes. Active maintenance, low install friction, permissive MIT license, and no known vulnerabilities make this a safe choice. Install if you author or optimize ONNX models and want to work in Python syntax rather than protobuf. The eager-mode debugger is a real productivity gain for model development, though not for production inference."},"id":"onnxscript","links":{"html":"https://skillfed.io/packages/onnxscript","md":"https://skillfed.io/packages/onnxscript.md","pypi":"https://pypi.org/project/onnxscript/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-06-29","license_spdx":null,"license_treatment":"permissive","name":"onnxscript","python_support":"supports_current","summary":"Naturally author ONNX functions and models using a subset of Python"},"popularity":{"monthly_downloads":3553221,"position":2579,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.7.1"}
