Skip to main content

Export Orange3 models with preprocessing pipelines to MLflow format for production deployment.

Project description

Orange3 MLflow Export

An Orange3 add-on that provides seamless export of complete machine learning workflows to MLflow format, including preprocessing pipelines and dependency management for reproducible deployment.

Overview

Export your Orange3 models with all preprocessing steps intact! This add-on bridges the gap between Orange3's visual machine learning environment and MLflow's production deployment capabilities.

Key Features

Complete Pipeline Export

  • Preprocessing Included: Unlike basic model saving, captures entire preprocessing pipelines (normalization, imputation, feature selection, etc.)
  • Domain Transformations: Preserves Orange's automatic domain handling for seamless prediction
  • Zero Information Loss: Everything needed for prediction is included

Production-Ready Deployment

  • MLflow Standard Format: Exports to industry-standard MLflow model format
  • Dependency Management: Automatically includes Orange3, scikit-learn, pandas, numpy, and all dependencies
  • Cross-Platform: Deploy on any platform supporting MLflow (local, cloud, containers)
  • Serving Ready: Use mlflow models serve immediately after export

Smart Input Handling

  • Flexible DataFrames: Accepts pandas DataFrames with automatic type conversion
  • Column Name Mapping: Intelligently handles feature name mismatches through positional mapping
  • Signature Inference: Automatically generates input/output schemas from sample data

Universal Compatibility

  • All Orange Models: Works with any Orange learner (classification, regression, clustering)
  • Any Preprocessing: Supports all Orange preprocessing widgets and operations
  • Version Independent: Models work across different Orange and Python versions

Quick Start

Installation

pip install orange3-mlflow-export
# or from source
pip install .

Basic Usage

In Orange GUI:

  1. Build your workflow (File → Preprocess → Model)
  2. Add MLflow Export widget (Example section)
  3. Connect your trained model
  4. Set export path and save

Programmatically:

from orangecontrib.example.widgets.owmlflowexport import OWMLFlowExport
import Orange

# Train model with preprocessing
data = Orange.data.Table("iris")
preprocessor = Orange.preprocess.preprocess.PreprocessorList([
    Orange.preprocess.Normalize(),
    Orange.preprocess.Impute()
])
processed_data = preprocessor(data)
model = Orange.classification.LogisticRegressionLearner()(processed_data)

# Export to MLflow
widget = OWMLFlowExport()
widget.set_model(model)
widget.filename = "model.mlflow"
widget.do_save()

Deploy and Serve:

mlflow models serve -m ./model.mlflow -p 8080

Why Choose This Over Standard Orange Model Saving?

Feature Orange Save Model MLflow Export
Preprocessing ❌ Lost ✅ Preserved
Dependencies ❌ Manual ✅ Automatic
Deployment ❌ Complex ✅ One Command
Portability ❌ Limited ✅ Universal
Production Use ❌ Difficult ✅ Seamless

Use Cases

  • Model Deployment: Export Orange models for production serving
  • Reproducible Research: Share complete workflows with dependencies
  • Cross-Platform Models: Train in Orange, deploy anywhere
  • MLOps Integration: Integrate Orange models into MLflow tracking and serving
  • Educational: Demonstrate complete ML pipeline deployment

Supported Orange Components

Models: All Orange learners (Tree, SVM, Neural Network, Linear, etc.)
Preprocessing: Normalize, Impute, Continuize, Feature Selection, PCA, etc.
Data Types: Tabular, spectroscopic, time series, text (with appropriate preprocessing)

Testing

Verify your exported models with included test scripts:

python test_spectra_model.py ./your_model.mlflow
python load_predictor.py

Requirements

  • Python 3.8+
  • Orange3
  • MLflow
  • pandas, numpy, scikit-learn
  • cloudpickle

Documentation

See the complete documentation for detailed usage, architecture, and troubleshooting.

License

GPL-3.0 (same as Orange3)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orange3_mlflow_export-0.1.0.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orange3_mlflow_export-0.1.0-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file orange3_mlflow_export-0.1.0.tar.gz.

File metadata

  • Download URL: orange3_mlflow_export-0.1.0.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for orange3_mlflow_export-0.1.0.tar.gz
Algorithm Hash digest
SHA256 931637592068305a2b7a097bf896dc4b056f602f60ff5ee5de58a3e22bb8c07a
MD5 c676e2a4749220e05e5817289875e1cf
BLAKE2b-256 6410f6a0cbbe25423edcf58b06c1dd2a4fbb47935a32d735455a3cc7a9eae93c

See more details on using hashes here.

File details

Details for the file orange3_mlflow_export-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for orange3_mlflow_export-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1cb73899cb20b33877f167dc261c2b4c58005998d4c09022c8c00171f712b40f
MD5 d1c17b17c88cc929d65a6df2007e5e6f
BLAKE2b-256 907a687f503bb89c7145a80403d9d0484afd6aa88ad0fff80c7f1b893f678a39

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page