This project is a lightweight, end-to-end machine learning experimentation platform inspired by production MLOps systems such as MLflow.
Unlike typical ML projects that focus only on training models, this platform focuses on ML system design, experiment governance, and model lifecycle control.
The system is built as a mini ML infrastructure layer rather than a notebook-based workflow.
- Registers datasets with explicit versioning
- Tracks experiments and their lifecycle states (CREATED, RUNNING, COMPLETED, FAILED)
- Persists experiment metrics in a relational database
- Registers models with explicit lifecycle stages (staging, production, archived)
- Performs automated regression detection before allowing model promotion
- Uses config-driven orchestration for reproducibility
- SQLite is used as the single source of truth for metadata
- Training logic is fully decoupled from tracking and registry logic
- All experiments, metrics, datasets, and models are DB-backed
- File system is treated as non-authoritative (no JSON-based tracking)
Key architectural principle:
The database, not the filesystem, defines the state of the ML system.
-
tracking/
Core platform logic for dataset registry, experiment tracking, model registry, and regression detection -
run_experiment.py
Single orchestrator entry point for running experiments -
train.py
Model training engine (stateless, DB-agnostic) -
db/
Database initialization and metadata storage -
configs/
YAML-based experiment definitions for reproducibility
- Dataset is registered in the platform
- Experiment is created via the orchestrator
- Training runs and metrics are logged
- Regression detection compares against the current production model
- Model is registered and staged only if regression checks pass
This enforces safety against silent performance degradation.
Credit Card Fraud Detection dataset (highly imbalanced classification).
Due to GitHub size limits, the dataset is not included in the repository.
Expected local path:
- Python 3.9+
- pip
- Dataset downloaded locally (see Dataset section)
git clone https://github.com/SahibTaj/ML-Training-Evaluation-Platform.git
cd ML-Training-Evaluation-Platformpython -m venv venvWindows
venv\Scripts\activateLinux / macOS
source venv/bin/activatepip install -r requirements.txtThis repository does not include datasets by design.
Steps:
- Download the Credit Card Fraud Detection dataset from Kaggle
- Create the following directory structure:
data/
└── versions/
└── v1/
└── creditcard.csv
Expected dataset path:
data/versions/v1/creditcard.csv
python db/init_db.pyThis creates:
db/ml_platform.db
python tests/test_dataset_registry.pyThis step:
- Registers
credit_card_fraud:v1in the database - Enables dataset validation for experiments
train.py directly
Use the orchestrator:
python run_experiment.py --config configs/fraud_baseline.yamlInternal flow:
- Dataset is validated
- Experiment is created
- Training runs
- Metrics are logged
- Regression detection is applied
- Model registration is gated
pythonfrom tracking.db import fetch_all
fetch_all("SELECT * FROM experiments;")
fetch_all("SELECT * FROM metrics;")
fetch_all("SELECT * FROM models;")streamlit run dashboard.pyThis shows:
- Experiment comparisons
- Metric summaries
- System state
- ❌ Do NOT commit datasets
- ❌ Do NOT run
train.pydirectly - ❌ Do NOT edit the database manually
- ❌ Do NOT use legacy JSON-based experiment folders
pip install -r requirements.txt
python db/init_db.py
python tests/test_dataset_registry.py
python run_experiment.py --config configs/fraud_baseline.yaml