The Problem
Predicting US Visa approval is a classic classification problem with real-world impact. When applicants submit their petitions, dozens of variables—from education levels and prevailing wage rates to employer history and job codes—determine the outcome.
I wanted to build not just an isolated machine learning model in a Jupyter Notebook, but a production-grade ML pipeline that follows modern software engineering best practices.
Architecture Overview
The project adheres to a modular design pattern where each lifecycle stage is decoupled and reproducible:
- Data Ingestion — Fetching raw records from MongoDB, validating schema types, and creating train/test splits.
- Data Transformation — Handling numerical imputation, categorical encoding with target encoding, and standardizing features.
- Model Training — Comparing Random Forest, XGBoost, CatBoost, and Gradient Boosting with automated hyperparameter tuning.
- Model Evaluation — Evaluating F1-score, precision-recall AUC, and verifying model drift thresholds.
- Model Deployment — Serving inference via a Flask REST API containerized with Docker.
Key Learnings & Takeaways
- Modular Code Over Monoliths: Splitting components into separate entity, configuration, and execution layers makes debugging effortless.
- Custom Logging & Exception Handling: Tracking custom exception hooks with line numbers and file contexts saved hours of troubleshooting.
- Docker Reproducibility: Containerizing the environment ensures identical runtime behavior across local development and AWS ECS.
- CI/CD Automation: GitHub Actions running automated unit tests and Docker image builds ensures no broken code enters production.
The Tech Stack
- Language & Libraries: Python 3.10, Scikit-learn, Pandas, NumPy, XGBoost
- Backend & Serving: Flask, Gunicorn
- DevOps & Cloud: Docker, GitHub Actions, AWS ECR, AWS EC2, MongoDB Atlas
Building an end-to-end pipeline taught me more about production software engineering than any standalone course ever could.

Golam Monayem
Machine Learning Engineer & Visual Designer based in Dhaka, Bangladesh. Studying CSE at Presidency University, team member at Wice BD, and building production-grade AI systems.
