Open Machine Learning Exchange¶
Train anywhere. Run anywhere. Keep the model semantics.
Portable machine learning models and pipelines across frameworks and runtimes. OMLE is an open, schema-aware interchange format with a compact Protocol Buffers representation for trained models together with their preprocessing and postprocessing pipelines.
Why OMLE?¶
Machine learning models are often trained in one environment but deployed in another. Framework-native formats are convenient inside their own ecosystems, but are not designed as general cross-framework, cross-language interchange formats.
OMLE provides:
- Portable model representation independent of the original training framework
- Complete inference pipelines including preprocessing, model scoring, and postprocessing
- Structured classical ML semantics for trees, ensembles, linear models, SVM, clustering, and more
- Explicit feature and target schemas
- Embedded verification, warm-up, and sample data
- Versioned operators and functions
- Cross-language inference
OMLE focuses on portable classical ML inference and tabular pipelines. PMML provides rich semantic representations for classical ML; ONNX provides a general operator graph and is widely used for neural-network portability. OMLE combines a logical schema, an operator graph, and structured model definitions where preserving ML semantics matters.
| Capability | PMML | ONNX / ONNX-ML | OMLE |
|---|---|---|---|
| Explicit feature schema | ✓ | Limited | ✓ |
| Missing / invalid / outlier policies | ✓ | Limited | ✓ |
| Structured classical ML models | ✓ | Partial | ✓ |
| Generic operator graph | Limited | ✓ | ✓ |
| Complete preprocessing pipelines | ✓ | ✓ | ✓ |
| Embedded verification data | Partial | Limited | ✓ |
| Compact binary representation | ✗ | ✓ | ✓ |
| Versioned operator/function registries | ✗ | ✓ | ✓ |
See the supported converters and ecosystem for available frameworks and deployment options.
Start here¶
For complete workflows covering training, export, interactive visualization, and
comparison of native and OMLE predictions, explore the
omle-models notebooks.
pip install "omle[convert]"
from omle import export_omle
# scikit-learn, XGBoost, LightGBM, CatBoost — pass the fitted estimator.
# X supplies the verification and sample rows embedded in the file.
export_omle(sklearn_pipeline, "model.omle", X=X_test)
pip install "omle[runtime]"
import omle
model = omle.load("model.omle")
y_pred = model.predict(X_test) # (n_samples,)
proba = model.predict_proba(X_test) # (n_samples, n_classes)
omle inspect model.omle
Or open the interactive model viewer:
pip install "omle[viewer]"
omle view model.omle # or omle-viewer model.omle
Opens the interactive DAG viewer in your browser. No server, nothing uploaded — or use the playground without installing anything.
pip install "omle[server]"
omle-server --model model.omle --rest-port 8080 --grpc-port 8081
Serves the model over REST and gRPC using the Open Inference Protocol. In another terminal, check that it is ready:
curl http://localhost:8080/v2/models/model/ready
The model name comes from the file stem (model.omle → model).
See omle-server for inference
requests, system requirements, and deployment configuration.
What the format carries¶
OMLE uses a hybrid representation rather than forcing everything through one abstraction.
Logical schema — named features and targets with types, measure levels, value domains, and the policies that decide what happens to a missing, invalid or outlying value. These explicit policies help preserve the behavior of the original inference pipeline across environments.
Graph nodes — a DAG of named operators spanning preprocessing, model
scoring, and postprocessing. CompositeNode
introduces local namespaces, so a ColumnTransformer round-trips without name
collisions.
Structured model bodies — dedicated proto messages for the classical families, so a gradient-boosted ensemble stays a tree ensemble rather than being lowered to matrix multiplies.
Embedded verification — a model file can carry reference inputs and expected outputs. A runtime can check these cases on load within declared tolerances to help detect conversion or execution differences.
Explore OMLE¶
- Specification — format design, semantics, validation, and versioning
- Converters — supported training frameworks and conversion coverage
- Ecosystem — runtimes, serving, Spark, JavaScript, and tooling
- Reference — operator and function reference
- Playground — inspect and run OMLE models in the browser
OMLE is under active development and is evolving toward its first stable v1 release.