Welcome to the Machine Learning Engineering repository setup guide! This guide walks you through setting up your local environment, managing dependencies, launching interactive Jupyter notebooks, and testing containerized inference services.
Before you begin, ensure you have the following installed on your system:
- Operating System: Linux, macOS, or Windows with WSL2 (Windows Subsystem for Linux)
- Python: Version
3.9or higher (python3 --version) - Git: For version control and cloning (
git --version) - Docker: (Optional but recommended) For modules covering containerized deployment (
05-deployment,09-serverless,10-kubernetes, and projects) - Pipenv: For module-specific virtual environment management (
pip install pipenv)
Clone the project to your local workstation:
git clone https://github.com/ozkary/ml-engineering.git
cd ml-engineeringYou can set up your Python environment using either a unified global virtual environment or module-specific environments.
To run notebooks across modules 01 through 04 and 06 through 08:
# Create a virtual environment
python3 -m venv .venv
# Activate the virtual environment
# On Linux/macOS:
source .venv/bin/activate
# On Windows (PowerShell):
# .venv\Scripts\Activate.ps1
# Upgrade pip and install core data science packages
pip install --upgrade pip
pip install jupyterlab notebook numpy pandas scikit-learn matplotlib seaborn xgboost tensorflowModules that include production code (e.g., 05-deployment, 09-serverless, projects/heart-disease-risk, projects/drug-drug-interaction) contain Pipfile and Pipfile.lock files for deterministic dependency resolution.
# Navigate to the module directory
cd 05-deployment
# Install exact pinned dependencies
pipenv install
# Activate the Pipenv shell
pipenv shellOnce your virtual environment is active, start Jupyter Lab from the repository root:
jupyter labThis will launch a web interface in your browser (typically at http://localhost:8888). You can browse into any module folder and open the homework.ipynb or project notebooks.
Several modules package trained models into containerized REST APIs.
cd 05-deployment
# Build the Docker image
docker build -t ml-churn-service:v1 .
# Run the container locally mapping port 9696
docker run -it --rm -p 9696:9696 ml-churn-service:v1In another terminal, test the prediction endpoint with a sample request:
curl -X POST http://localhost:9696/predict \
-H "Content-Type: application/json" \
-d '{"seniorcitizen": 0, "tenure": 1, "monthlycharges": 29.85, "totalcharges": 29.85}'If you are new to machine learning:
- Start with 01-Introduction to understand the core paradigm of learning from data.
- Watch the companion video Discovering Machine Learning: A Primer Guide.
- Work through 02-Regression and 03-Classification to build models on real tabular datasets.
- Dive into 04-Evaluation to master cross-validation, precision-recall, and ROC-AUC metrics.
- Advance to production engineering in 05-Deployment, 06-Trees, 08-Deep Learning, and 10-Kubernetes.
- Explore real-world capstone projects in projects/heart-disease-risk and projects/drug-drug-interaction.
- Check existing discussions or file an issue on GitHub.
- Review the Contribution Guidelines.
- Follow updates on the Newsletter and Twitter / X (@ozkary).