A Rosetta Stone for model formats, mostly written by other people
ONNXMLTools wraps a half-dozen converters into one package so you can stop memorizing which tool handles which framework.

What it does ONNXMLTools is a unified Python package that converts trained models from eight different ML toolkits—scikit-learn, TensorFlow, XGBoost, LightGBM, CatBoost, Apple Core ML, Spark ML, and H2O—into the ONNX format. For several of these, it’s essentially a thin wrapper around dedicated converters like tf2onnx and skl2onnx, with the value being that you only need to remember one API.
The interesting bit
The opset negotiation logic is more subtle than it looks. You can request a target_opset, but the converter may return a model with a lower version if that’s the newest opset shared by all operators in your graph. It’s a pragmatic backwards-compatibility choice that prevents silent breakage.
Key highlights
- Supports Keras, scikit-learn, Core ML, LightGBM, XGBoost, CatBoost, H2O, libsvm, and Spark ML (experimental)
- TensorFlow and scikit-learn conversions delegate to tf2onnx and skl2onnx respectively
- PyTorch is explicitly out of scope—use PyTorch’s built-in exporter instead
- Requires Python 3.7+; needs the source toolkit installed at conversion time
- Unit tests verify against onnxruntime automatically
Caveats
- Core ML support is pinned to CoreMLTools 3.1 or lower, which is increasingly dated
- Spark ML support is marked experimental
- Installing from source requires setting
ONNX_ML=1before building theonnxdependency, an easy step to miss
Verdict Worth a look if you’re maintaining a polyglot ML pipeline and want one import to handle most of your conversion chores. Skip it if you’re all-in on PyTorch or need bleeding-edge Core ML support.