onnxmltools
Converts Machine Learning models to ONNX
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has low install friction, carries a permissive license, and solves a real problem—enabling model portability across ML frameworks. It is well-suited for teams needing to standardize model formats or deploy models on runtimes that require ONNX. Install it when you need to convert models from any of its supported frameworks; skip it if your workflow stays within a single framework's native inference ecosystem.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Source installation requires setting environment variable ONNX_ML=1 before installing the onnx package; framework-specific converters require those frameworks to be installed separately.
- Low friction install with a pure-wheel distribution.
- Actively maintained with recent commits and a stable release cadence.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions beyond attribution.
last release 2026-01-30 (196 days) · last repo commit 2026-08-01 · 1,168 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 902,456 downloads/mo, #4,769 on PyPI
Alternatives
Verify before relying
pip install onnxmltools
import onnxmltools
# Convert a model (framework-specific converter called with model object)
onnx_model = onnxmltools.convert_coreml(coreml_model, 'Example Model')
onnxmltools.utils.save_model(onnx_model, 'example.onnx')- Whether all listed framework converters (Spark ML marked experimental, others not) are production-ready or carry known limitations.
- Performance characteristics when converting large or complex models across different frameworks.
- Compatibility matrix between specific framework versions and onnxmltools converter reliability.
What it is and what it does
ONNXMLTools is a conversion toolkit that translates trained machine learning models from their native framework formats into ONNX (Open Neural Network Exchange), a standardized model interchange format. It wraps or implements converters for TensorFlow, scikit-learn, Core ML, LightGBM, XGBoost, H2O, CatBoost, Spark ML, and libsvm, allowing models trained in any of these frameworks to be exported as ONNX files that can then run on any ONNX-compatible runtime.
The package depends on numpy, onnx, protobuf, and skl2onnx as core runtime dependencies. Conversion is controlled via a target_opset parameter to ensure compatibility with specific ONNX versions; the converter respects operator set versioning by selecting the maximum opset required by all operators in the model. It is actively maintained, tested with Python 3.9 through 3.13, and has no known security vulnerabilities.
Use it for
- Export a scikit-learn classifier to ONNX for deployment on a web service or edge device that only supports ONNX Runtime.
- Convert a TensorFlow model to ONNX to enable inference on platforms that lack TensorFlow support.
- Standardize model formats across a team using different ML frameworks by converting all models to ONNX for unified inference pipelines.
- Prepare a LightGBM or XGBoost model for production by exporting to ONNX to decouple inference from the original training library.
- Validate model behavior across frameworks by converting to ONNX and running inference to verify numerical consistency.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has low install friction, carries a permissive license, and solves a real problem—enabling model portability across ML frameworks. It is well-suited for teams needing to standardize model formats or deploy models on runtimes that require ONNX. Install it when you need to convert models from any of its supported frameworks; skip it if your workflow stays within a single framework's native inference ecosystem.
Install
onnxmltools on PyPI
Before you install
Low friction install with a pure-wheel distribution. Actively maintained with recent commits and a stable release cadence. Requires numpy, onnx, protobuf, and skl2onnx as runtime dependencies, all widely available.
Source installation requires setting environment variable ONNX_ML=1 before installing the onnx package; framework-specific converters require those frameworks to be installed separately.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions beyond attribution.
Quickstart
pip install onnxmltools
import onnxmltools
# Convert a model (framework-specific converter called with model object)
onnx_model = onnxmltools.convert_coreml(coreml_model, 'Example Model')
onnxmltools.utils.save_model(onnx_model, 'example.onnx')
Verify before relying
- Whether all listed framework converters (Spark ML marked experimental, others not) are production-ready or carry known limitations.
- Performance characteristics when converting large or complex models across different frameworks.
- Compatibility matrix between specific framework versions and onnxmltools converter reliability.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesnumpyonnxprotobufskl2onnx |
| Maintenance | Actively maintained 196 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 902,456 / month, #4,769 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9 |
Evidence: onnxmltools-1.16.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “sklearn model export”
- onnxmltoolsConverts machine learning models from multiple frameworks…
- skl2onnxConverts trained scikit-learn models to ONNX format for deployment…
- opentelemetry-instrumentation-sklearnAdds distributed tracing instrumentation to scikit-learn operations,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also onnxconverter-common · skl2onnx · tf2onnx · onnx2torch · coremltools · sklearn2pmml · orbax-export · netron · tensorflowjs · onnx2tf