minotianadev/iso-42001-mlops-dashboard
0
Auditable MLOps Pipeline — ISO/IEC 42001 & 38505
An end-to-end ML pipeline that automates data validation, model training, bias mitigation, and metrics tracking, producing a signed compliance audit report (data/compliance_audit_report.json) every time a model is built.
Quick Start
pip install -r requirements.txt
python -m src.train # runs ingest -> train -> audit -> certificate
pytest -v # 13 tests: regression + compliance schema/tamper checks
streamlit run src/app.py # launch the compliance dashboardWhat gets generated
data/model.joblib— trained RandomForestClassifierdata/lineage_log.json— append-only ledger of every data ingestion event (ISO/IEC 38505)data/compliance_audit_report.json— signed certificate with dataset hash, model performance, and fairness metrics (ISO/IEC 42001 + 38505)
Architecture
Raw CSV -> ingest.py (SHA-256 hash, lineage log)
-> train.py (RandomForestClassifier, accuracy/F1)
-> audit.py (Disparate Impact Ratio, Demographic Parity Difference)
-> certificate.py (signed JSON certificate)
-> app.py (Streamlit dashboard, certificate download)Fairness threshold
The Disparate Impact Ratio must fall within [0.80, 1.25] to be marked COMPLIANT. Outside that range the certificate is marked NON_COMPLIANT (or NON_COMPLIANT_RISK_OVERRIDE if explicitly overridden).
Deployment (free tier)
Push this repo to a Hugging Face Space (Streamlit SDK) or Render free web service. See SPECIFICATION.md for full deployment notes and the .github/workflows/compliance_ci.yml workflow for CI verification on push.
