End-to-end machine learning pipeline built with Apache Airflow for automated model training and prediction.
This project demonstrates how to build and automate an ML workflow using Apache Airflow.
The pipeline:
- loads and prepares data
- trains a machine learning model
- saves the trained model
- performs predictions on new data
- organizes ML workflow using Airflow DAG
Data
↓
Data preprocessing
↓
Model training
↓
Model serialization (.pkl)
↓
Prediction pipeline
↓
Airflow DAG orchestration- Python 3.12
- Apache Airflow
- Docker & Docker Compose
- Scikit-learn
- Pandas
- Dill
- PostgreSQL
- Redisairflow-ml-pipeline/
├── dags/
│ └── hw_dag.py
├── modules/
│ ├── pipeline.py
│ └── predict.py
├── data/
│ ├── test/
│ └── models/
├── docker-compose.yml
├── requirements.txt
├── LICENSE
└── README.mdThe pipeline trains a machine learning model and stores it as a serialized file.
Steps:
1. Data loading
2. Feature preprocessing
3. Model training
4. Model saving
5. Prediction generationAirflow DAG consists of tasks:
1. Model training
2. Saving trained model
3. Loading test data
4. Generating predictionsClone repository:
git clone https://github.com/lllda06/airflow-ml-pipeline.gitRun Airflow environment:
docker compose up -dOpen Airflow UI:
http://localhost:8080📊 Results The pipeline successfully automates the ML lifecycle from training to prediction.
👩💻 Author Bahdanovich Lada

