MLOps#

Deployment and life-cycle management of discovered equations (MLOps).

Equations are small, transparent and portable, which makes them well suited to industrial deployment – but like any data-driven model they are valid only on the data they were fitted to. This module supports the life cycle:

  • fingerprint() – a hash of the training data, stored with the model;

  • ModelRegistry – a file-based registry of versioned equations with metrics, data fingerprints, tags and stages (staging, production, archived), and structural comparison of versions;

  • ModelCard – documentation of a model in the spirit of model cards (Mitchell et al., 2019): intended use, data, equation, metrics, validity range, constraints, limitations; Markdown and HTML;

  • RunTracker – run logging to JSON lines, with an optional MLflow adapter (MLflow is imported only if installed);

  • DriftMonitor – monitoring of new data: population stability index and Kolmogorov–Smirnov tests per variable, the share of samples outside the training box (where an equation extrapolates), residual drift by the Page–Hinkley test (Page, 1954), and a recommendation (ok / warning / retrain);

  • environment_info() – package versions for reproducibility.

Model registry, model cards, run tracking and drift monitoring.

Classes#

ModelRegistry(root)

File-based registry of versioned equations.

ModelCard(equation[, name, intended_use, ...])

Documentation of a discovered equation.

RunTracker([directory, mlflow, experiment])

Log parameters, metrics and equations of search runs.

DriftMonitor(equation, X_ref[, y_ref, ...])

Monitor the inputs and residuals of a deployed equation.

Functions#

fingerprint(X[, y])

SHA-256 fingerprint (first 16 hex digits) of the data.

environment_info()

Versions of Python, eqdisco and its main dependencies.

population_stability_index(ref, new[, bins])

PSI of a variable between reference and new samples (quantile bins of the reference).

psi_critical_value(n_ref, n_new[, bins, level])

Value that the PSI of two samples of one distribution exceeds with probability 1 - level.