Skip to main content

mlops

Shared MLOps platform package — not a machine learning project of its own. It gives every ML project the generic building blocks of a training pipeline (data validation, experiment tracking, quality gates, drift monitoring), so each project imports them instead of re-writing the same tracking/quality-gate/validation/monitoring logic:

  • mlops.validation.run_expectations(df, rules) — run Great Expectations rules
  • mlops.mlflow_tracking.log_and_register(...) / promote_model_to_production(...) — MLflow experiment tracking and model registry
  • mlops.quality_gate.check_threshold(...) — stop a pipeline if a metric regressed
  • mlops.monitoring.check_drift(reference_data, current_data) — Evidently drift detection
  • mlops.git_info.get_current_commit_hash() — commit hash for run metadata

Everything project-specific (data source, feature engineering, model training, API serving, the orchestration flow that wires these steps together) stays in each consuming project's own repo — mlops only provides the reusable building blocks above.

Install

pip install mlops_abp
# or with uv
uv add mlops_abp

The distribution is named mlops_abp on PyPI; the importable package is mlops:

from mlops import log_and_register, check_threshold, run_expectations, check_drift

For local development against a checkout of this repo instead of the published release:

cd /path/to/your-project
uv add --editable /path/to/mlops

Usage

from mlops import check_threshold, log_and_register, run_expectations

run_expectations(df_train, rules=[
    {"expectation": "expect_column_values_to_not_be_null", "kwargs": {"column": "target"}},
])

run_id = log_and_register(
    model=model,
    run_name="baseline",
    params=params,
    metrics=metrics,
    model_name="your_model_name",
    experiment_name="your_project_experiment",  # distinct per project
)
check_threshold(metrics["accuracy"], threshold=0.85, metric_name="accuracy")

Drift monitoring:

from mlops import check_drift

if check_drift(reference_data=baseline_df, current_data=recent_df):
    print("Drift detected — consider retraining")

Shared platform infrastructure (optional, for self-hosting MLflow/Prefect)

git clone <this-repo>
cd mlops
cp .env.example .env
docker compose up -d   # postgres (MLflow backend store) + mlflow-server + prefect-server
  • MLflow UI: http://localhost:5000
  • Prefect UI: http://localhost:4200

Development

uv sync
uv run pytest tests/ -v
uv run ruff check mlops/ tests/

License

MIT — see LICENSE.

Download files

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

Source Distribution

mlops_abp-0.1.0.tar.gz (389.8 kB view details)

Uploaded Source

Built Distribution

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

mlops_abp-0.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mlops_abp-0.1.0.tar.gz
  • Upload date:
  • Size: 389.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mlops_abp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2cfa4699ea8ebf98e145974fc5249ceed651b3b163078faf256b979640db5e26
MD5 a04412095420d46939ca285bc8756376
BLAKE2b-256 87e9a70e1caab02401827ca06f99b3a6c967993b6c736e508383f634e75cb975

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlops_abp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mlops_abp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab4cd7df4ee02d00267f171ab16669d938268c0a907ff9af240d24d4318b05f8
MD5 61d8a2c478ef51d58516c7b09f913104
BLAKE2b-256 9d414cd0454eaea0669e46114e5d2a7f99d5a51c1682558e9c40533212c5b01d

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.2

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page