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 rulesmlops.mlflow_tracking.log_and_register(...)/promote_model_to_production(...)— MLflow experiment tracking and model registrymlops.quality_gate.check_threshold(...)— stop a pipeline if a metric regressedmlops.monitoring.check_drift(reference_data, current_data)— Evidently drift detectionmlops.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.
Metadata
Release files for mlops_abp 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mlops_abp-0.1.2.tar.gz | 349.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mlops_abp-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 359.5 kB
Release files / mlops_abp-0.1.2.tar.gz
| Download URL | mlops_abp-0.1.2.tar.gz |
|---|---|
| Size | 349.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
193cf716efb89362062fdb0f7e9ce636d5981846e13bdb521885959e813e7aae
|
|
BLAKE2b-256 checksum How to use checksums |
a48c4b089778b9482c1040df2849782b125df23f23e5bba25ce1dc6967797688
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / mlops_abp-0.1.2-py3-none-any.whl
| Download URL | mlops_abp-0.1.2-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ec0a0df98cfa41699f51f1cb4da85aec7da5b5d0ebdb0f3768bbd6f96a96779
|
|
BLAKE2b-256 checksum How to use checksums |
4e4865d6698a750f6dab3883641111d95696b8362a07b6bf522c662037a15360
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|