Lab build

Student performance prediction on AWS and Azure

Predicts student maths scores and deploys the Flask app to Elastic Beanstalk, EC2 and Azure Web App.

Role
Builder, end to end
Group
MLOps
Services
AI & LLM systems · MLOps & cloud

What it does

Student performance data is ingested and split, then numeric and categorical columns go through imputation, one-hot encoding and scaling in a ColumnTransformer. Seven regressors including CatBoost and XGBoost are tuned with GridSearchCV and the best by R² is saved for a Flask prediction pipeline. The app is deployed to AWS Elastic Beanstalk, to EC2 through GitHub Actions and Amazon ECR, and to Azure Web App through Azure Container Registry.

What was built

  1. 01

    Ingestion reads the dataset and writes raw, train and test CSVs to an artifacts folder.

  2. 02

    Preprocessor applies median imputation and scaling to numeric columns, and mode imputation, one-hot encoding and scaling to categoricals.

  3. 03

    Seven regressors are tuned with 3-fold GridSearchCV; the best R² model and the preprocessor are pickled.

  4. 04

    .ebextensions config points Elastic Beanstalk at the Flask application object.

  5. 05

    GitHub Actions workflows deploy to EC2 through ECR and a self-hosted runner, and to Azure Web App through ACR.

The pipeline, layer by layer

Five layers, one pipeline.

  1. L1Data

    • Student CSV
    • Train-test split
  2. L2Transformation

    • ColumnTransformer pipeline
  3. L3Training

    • Regressor grid search
  4. L4Serving

    • Flask predict pipeline
  5. L5Deployment

    • Elastic Beanstalk
    • EC2 via ECR
    • Azure Web App

Stack

  • scikit-learn
  • CatBoost
  • XGBoost
  • pandas
  • Flask
  • Docker
  • AWS Elastic Beanstalk
  • GitHub Actions
  • Amazon ECR
  • Amazon EC2
  • Azure Container Registry
  • Azure Web App

Next lab build · 20 / 46

Colorectal cancer survival prediction on Kubeflow

Predicts colorectal cancer patient survival with gradient boosting, tracked in MLflow and run on Kubeflow.

Previous: Guns object detection API

Need a system like this in production? Tell us about it.