The guide

Data in, monitored
service out.

one data model · one contract · one pipeline

The design brief is the why. These docs are the how: a hands-on run through the whole lifecycle, one topic per page. Every snippet is real API, mirrored from the runnable programs in examples/.

Quickstart

Fit and predict in a dozen lines.

Add the crate — default is a lean, useful core (smartcore backend, preprocessing, model selection, ensembles).

cargo add millwright
use millwright::prelude::*;

// features as rows + a target -> a Dataset
let x = Frame::from_rows(rows, vec!["a".into(), "b".into()])?;
let train = Dataset::new(x, y)?;

// standardize, then a random forest — one composable object
let mut pipe = Pipeline::new()
    .step("scale", StandardScaler::new())
    .estimator("rf", RandomForest::new());

pipe.fit(&train)?;
let preds = pipe.predict(&test)?;

cargo run --example spine

Cargo features

Pull only what you need.

Every capability is a feature over one crate. A serving binary never compiles SHAP; a notebook never compiles axum. full lights up everything Rust-facing.

# just the spine
millwright = { version = "0.1", default-features = false, features = ["smartcore-backend"] }

# the whole lifecycle
millwright = { version = "0.1", features = ["full"] }
FeatureAdds
smartcore-backenddefaultRandomForest · LinearRegression
preprocessingdefaultSmote · RandomOverSampler (imputers/scalers/encoders are core)
model-selectiondefaultKFold · StratifiedKFold · GridSearch · RandomSearch · metrics
ensembledefaultVoting · Bagging · Stacking
edaTable (polars CSV/Parquet ingest) · Profile (typed EDA)
linfa-backendKMeans · GaussianMixture · Dbscan · Pca
hpoBayesSearch (TPE) over a SearchSpace
diagnosticsOLS Diagnostics: VIF · residuals · Cook's distance
explainExplainer (SHAP) · permutation_importance
calibrationPlattScaling · IsotonicRegression · reliability_curve · CalibratedClassifier
anomalyMahalanobis · KnnScore outlier detectors
vizROC / residual SVG figures
onnxexport_onnx · InferenceModel (tract)
registryversioned model Registry
monitorDriftMonitor (PSI)
serveServer — POST /predict, GET /metrics
timeseriesAutoArima forecaster
incrementalIncrementalLinear (partial_fit)
automlAutoML search
pythonthe pip install millwright package

Reproducibility is a feature too: engines pinned to exact versions, a committed Cargo.lock, golden-output tests, and a feature-matrix CI. See the repo.