This release is a pre-release and may not be stable for production use.
OMLE
Open Machine Learning Exchange — an open, schema-aware interchange format for classical machine learning inference.
OMLE provides a compact binary format (protobuf) for representing trained ML models and their preprocessing and postprocessing pipelines. It preserves model semantics at a level practical for interoperability, conversion, validation, and deployment-oriented inference across major ML ecosystems.
Why OMLE?
Classical ML has an interoperability gap:
- PMML is semantically rich but XML-based, verbose, and no meaningful updates for many years.
- ONNX-ML has poor support for classical ML semantics. It lacks schema-level concepts like feature binding, missing/invalid/outlier handling, measure levels, and value domains.
- Framework-native formats (pickle, joblib, XGBoost JSON, LightGBM text) are not portable and carry security risks.
OMLE fills this gap with a modern binary format that combines PMML's semantic richness with ONNX's operational pragmatism, under a permissive license.
| Capability | PMML | ONNX-ML | OMLE |
|---|---|---|---|
| Feature schema with measure levels | ✓ | ✗ | ✓ |
| Missing / invalid / outlier handling | ✓ | ✗ | ✓ |
| Structured ML models (trees, tree ensembles, linear, SVM, MLP, naive Bayes, clustering, anomaly detection) | ✓ | partial | ✓ |
| Generic ML models (KNN) | ✗ | ✗ | ✓ |
| Generic operator graph | ✗ | ✓ | ✓ |
| Embedded verification, warm-up and sample inputs | partial | ✗ | ✓ |
| Binary format | ✗ | ✓ | ✓ |
| Versioned operator registry | ✗ | ✓ | ✓ |
| Permissive license | ✓ | ✓ | ✓ |
Design
OMLE uses a hybrid representation:
- Logical schema — named features and targets with types, measure levels, value domains, and preprocessing policies (missing, invalid, outlier handling)
- Graph nodes — a DAG of named operators spanning preprocessing, model scoring, and postprocessing
- Structured model bodies — dedicated proto messages for classical ML families where preserving high-level semantics matters
Data Model
Every named value in the graph has shape [N, ...], where N is the leading row dimension. The graph operates on a namespace of named tensors — nodes consume named values and produce new named values. Structured implementations use positional indexing into a flat slot space derived from their input list.
Expression DSL
OMLE includes an elementwise expression sub-DSL for per-column derived computations. Expressions operate on [N] columns using a versioned set of 61 primitives (arithmetic, comparison, logical, math, conditional, null handling, string, date, type conversion, value mapping). The expression language is separate from the graph operator set — graph nodes handle structurally interesting operations, expressions handle elementwise math.
Scope Isolation
CompositeNode introduces local namespaces for subgraph isolation. Internal nodes only see names explicitly passed as inputs — no transitive visibility into enclosing scopes. This enables clean composition of preprocessing pipelines and multi-model architectures without name collisions.
Installation
The omle Python package is the reference implementation: the in-memory IR, protobuf serialization, validation, and the omle CLI.
# Core SDK (IR types, protobuf I/O, validation, CLI)
pip install omle
# With individual components
pip install "omle[convert]" # converters (scikit-learn, Spark ML, XGBoost, LightGBM, CatBoost)
pip install "omle[runtime]" # C++ inference runtime
pip install "omle[viewer]" # Jupyter / browser DAG viewer
# Everything
pip install "omle[all]"
Requires Python 3.10+. protobuf is the only required dependency.
Quick Start
import omle
# Load a model — format is inferred from the extension
# (.omle / .pb / .bin → protobuf, .json → JSON)
model = omle.load("model.omle")
# Validate against structural rules and the operator/function registries
result = omle.validate(model)
if not result.is_valid:
print(result)
# Inspect
print(model.metadata.format_version)
for fw in model.metadata.source_frameworks:
print(fw.name, fw.version, fw.role)
for node in model.nodes:
print(node.name, f"{node.domain}.{node.op}")
# Round-trip to JSON for diffing or hand-editing
omle.save(model, "model.json")
Converting a trained model requires omle-convert:
from omle import export_omle
# scikit-learn, XGBoost, LightGBM, CatBoost — pass the fitted model
export_omle(sklearn_pipeline, "model.omle", X=X_test)
# Spark ML — pass a fitted PipelineModel; dataset supplies verification and sample rows
export_omle(pipeline_model, "spark_model.omle", dataset=train_df)
Command-Line Interface
The omle CLI provides tools for working with model files:
# Validate a model file
omle validate model.omle
omle validate model.omle --no-registry
# Inspect a model's structure
omle inspect model.omle
omle inspect model.omle --section nodes
omle inspect model.omle --section metadata
omle inspect model.omle --json
# Open the interactive DAG viewer in a browser (requires omle-viewer)
omle view model.omle
# Convert a model to OMLE format (requires omle-convert).
# The source framework is auto-detected from the file contents or extension.
omle convert model.joblib output.omle # scikit-learn
omle convert saved_pipeline/ output.omle # Spark ML
omle convert model.json output.omle # XGBoost JSON (or CatBoost JSON)
omle convert model.txt output.omle # LightGBM
omle convert model.cbm output.omle # CatBoost native
omle convert forwards all arguments to omle-convert; see its
README for the full option set.
Reference
- Specification — proto schema, registries, versioning
- Operator and function reference — every ML model family, feature operator and expression primitive, generated from the registries
Ecosystem
| Package | Language | Purpose |
|---|---|---|
omle |
Python | This package — IR, protobuf I/O, validation, CLI |
omle-convert |
Python | Converters from trained models to .omle |
omle-runtime |
C++ (Python/Java bindings) | Inference runtime |
omle-viewer |
Python + TypeScript | Interactive DAG viewer for Jupyter and the browser |
omle.js |
TypeScript | Browser/Node loader, validator, and execution engine |
Converter Status
Provided by omle-convert:
| Framework | Status | Notes |
|---|---|---|
| Scikit-Learn | Available | Pipeline walker; trees, ensembles, linear, SVM, MLP, KNN, Naive Bayes, clustering, anomaly detection, decomposition, text, preprocessing; category_encoders supported |
| Spark ML | Available | Live (PySpark) and no-Spark (saved-format reader via pyarrow) paths; XGBoost4J and SynapseML LightGBM models |
| XGBoost | Available | Sklearn wrappers, native Booster, and .json files |
| LightGBM | Available | Sklearn wrappers, native Booster, and .txt files |
| CatBoost | Available | Sklearn wrappers and .cbm / .json files |
| PMML | Planned | Round-trip fidelity for the compliance audience |
Contributing
OMLE is in active development. The proto schema and registries are stabilizing toward a v1 release. See CONTRIBUTING.md for development setup and the checks a change needs to pass, and CODE_OF_CONDUCT.md for community expectations.
Contributions are welcome in:
- Converter implementations
- Runtime implementations
- Validation tooling
- Documentation and specification refinements
License
Release files for omle 0.1.0rc1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| omle-0.1.0rc1.tar.gz | 185.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| omle-0.1.0rc1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 286.6 kB
Release files / omle-0.1.0rc1.tar.gz
| Download URL | omle-0.1.0rc1.tar.gz |
|---|---|
| Size | 185.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c69e800a41c1b3359bef7e8450718e31872af80418570af2e0227947781a6b3
|
|
BLAKE2b-256 checksum How to use checksums |
b3e619cf8c5abb6009790cda453e47cda331d26af6ddd632803299fa5a8ba2bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency logRelease files / omle-0.1.0rc1-py3-none-any.whl
| Download URL | omle-0.1.0rc1-py3-none-any.whl |
|---|---|
| Size | 101.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
244cee297d9fc8c51054b8edff95266017be2e1c9cde64f81b937256470d47eb
|
|
BLAKE2b-256 checksum How to use checksums |
7d1183648ddbb501786c60e65fd217eb8fe32e96127df8d5c6b29944cb7092b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency log