Installation#

Requirements#

yet-another-onnx-builder (yobx) requires Python 3.12 or later and the following core dependencies (installed automatically):

onnx-light supplies the native ONNX protobuf objects, graph builder, optimizer, and shape inference engine. The reference onnx package is not required. Use the published onnx-light wheels for your Python version and platform.

Basic installation#

Install the base package from PyPI:

pip install yet-another-onnx-builder

Release artifacts#

The Build Release Wheels workflow builds a universal py3-none-any wheel and a source distribution whenever a Git tag is pushed. Since yobx is a pure Python package, the same wheel serves every supported Python version and platform; native binaries are provided by its onnx-light dependency.

The workflow creates the GitHub Release for the tag if necessary and uploads both distributions. Rerunning it replaces matching assets without changing existing release notes.

To rebuild an existing release, run the workflow manually with its tag input (for example, 0.2.4 or refs/tags/0.2.4). A manual run without a tag only builds and stores workflow artifacts for the selected branch.

Optional dependencies#

Framework-specific extras are declared in pyproject.toml. Install one or more of them alongside the base package:

scikit-learn (and compatible libraries)

# scikit-learn models
pip install "yet-another-onnx-builder[sklearn]"

# category-encoders support
pip install "yet-another-onnx-builder[category_encoders]"

# imbalanced-learn support
pip install "yet-another-onnx-builder[imblearn]"

# LightGBM support
pip install "yet-another-onnx-builder[lightgbm]"

# Perpetual support
pip install "yet-another-onnx-builder[perpetual]"

# XGBoost support
pip install "yet-another-onnx-builder[xgboost]"

# scikit-survival support
pip install "yet-another-onnx-builder[sksurv]"

Deep learning

# PyTorch export
pip install "yet-another-onnx-builder[torch]"

# TensorFlow / JAX export
pip install "yet-another-onnx-builder[tensorflow]"

# JAX-only export
pip install "yet-another-onnx-builder[jax]"

# LiteRT / TFLite export
pip install "yet-another-onnx-builder[litert]"

ONNX graph building

The native onnx-light graph builder is included in the base installation; no extra is needed. The former spox extra and the Spox/onnxscript builder bridges are no longer supported because they require reference ONNX.

Multiple extras at once

pip install "yet-another-onnx-builder[sklearn,torch]"

Development installation#

To contribute or run the test suite, clone the repository and install the dev extras:

git clone https://github.com/xadupre/yet-another-onnx-builder.git
cd yet-another-onnx-builder
pip install -e ".[dev]"

To build the documentation locally, also install the docs extras in addition to all the packages the library supports.

pip install -e ".[docs]"
cd docs
bash make_doc