Exercise files for the LinkedIn Learning course Full-Stack Deep Learning with Python, instructed by Janani Ravi (Loonycorn). The course covers the end-to-end ML lifecycle — from data preparation and model training to experiment tracking, hyperparameter optimization, and local model serving.
├── datasets/
│ └── (EMNIST letters train/test CSV files)
├── demo_01_EMNISTClassificationUsingDNN.ipynb
├── demo_02_EMNISTClassificationUsingCNN.ipynb
└── demo_03_ModelDeployment.ipynb
| Notebook | Description |
|---|---|
demo_01_EMNISTClassificationUsingDNN.ipynb |
Loads and explores the EMNIST dataset, builds a DNN image classifier, and introduces MLflow experiment tracking with metrics and artifact logging. |
demo_02_EMNISTClassificationUsingCNN.ipynb |
Implements a CNN-based classifier using PyTorch Lightning, logs runs via MLflow autologging, registers the trained model, and achieves ~91.7% test accuracy. |
demo_03_ModelDeployment.ipynb |
Downloads a registered MLflow model, sets up a local virtual environment, and serves the model as a REST endpoint using mlflow models serve. |
- Python 3.10 or later
- A Google account (notebooks are designed for Google Colab with Google Drive)
- An ngrok account and auth token (to tunnel the MLflow UI from Colab)
- The EMNIST letters dataset from Kaggle —
emnist-letters-train.csvandemnist-letters-test.csv
The first two notebooks are designed to run on Google Colab with a T4 GPU runtime.
- Upload the EMNIST CSV files to your Google Drive under
MyDrive/emnist_data/. - Open the notebook in Colab and set the runtime to T4 GPU (
Runtime > Change runtime type). - Run the installation cells at the top of each notebook. All required packages are installed inline.
- Set your ngrok auth token in the cell that references
NGROK_AUTH_TOKENbefore starting the MLflow UI.
Model deployment is intended to run locally. From your terminal:
mkdir full_stack_deep_learning && cd full_stack_deep_learning
python3 -m venv fsdl_venv
source fsdl_venv/bin/activate # Windows: fsdl_venv\Scripts\activate
pip install --upgrade pip
pip install torch matplotlib numpy pandas mlflow pytorch_lightningInstall the Jupyter kernel and launch the notebook:
pip install ipykernel
python -m ipykernel install --user --name=fsdl_venv
jupyter notebookPlace the downloaded MLflow model artifacts under:
full_stack_deep_learning/mlruns/best_model/
Serve the model:
mlflow models serve -m mlruns/best_model --env-manager local --host 127.0.0.1 --port 1234| Package | Purpose |
|---|---|
torch / pytorch_lightning |
Model definition and training |
mlflow |
Experiment tracking, model registry, and serving |
optuna |
Hyperparameter optimization (covered in course Chapter 4) |
pyngrok |
Tunnel MLflow UI from Colab to a public URL |
torchmetrics |
Accuracy and other training metrics |
matplotlib / seaborn |
Visualization |
This repository accompanies the following chapters:
- An Overview of Full-Stack Deep Learning — Components, artifacts, and tooling across the ML lifecycle.
- MLOps with MLflow — Setting up MLflow, running the tracking UI, and understanding the ML operations workflow.
- Model Training and Evaluation Using MLflow — Training DNN and CNN models on EMNIST, logging parameters, metrics, and artifacts.
- Hyperparameter Tuning with Optuna — Defining objective functions, running optimization trials, identifying the best model, and registering it.
- Model Deployment and Predictions — Serving a registered MLflow model locally and querying it over HTTP.
- The ngrok auth tokens visible in the notebooks are session-specific and have been rotated. Replace them with your own token from the ngrok dashboard.
- Pixel values in the EMNIST CSVs are in the range [0, 255] and require normalization. Labels start at 1 and are shifted to 0-indexed in the dataset class.
- The CNN in
demo_02reaches approximately 91.7% test accuracy after 10 epochs on the EMNIST letters split.
These materials are provided for educational use only. All rights belong to LinkedIn Learning and the original instructor. Redistribution for commercial purposes is strictly prohibited.