GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - PK1612/mnist_classification_w_cicd: CI/CD pipeline with automated testing for model trained on MNIST dataset

BranchesTags
Open more actions menu

Latest commit

 

History

16 Commits
16 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
mnist_pipeline.egg-info
mnist_pipeline.egg-info
 
 
src
src
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
requirements.txt
requirements.txt
 
 
setup.py
setup.py
 
 

Repository files navigation

ML Model Training Pipeline

ML Pipeline

This repository contains the complete implementation of a simple Convolutional Neural Network (CNN) for MNIST digit classification with a complete CI/CD pipeline using GitHub Actions.

Project Architecture

graph LR
    A[Data Preparation] --> B[Training]
    B --> C[Model Evaluation]
    C --> D[Model Artifacts]
    D --> E[GitHub Actions Pipeline]
Loading

Model Architecture

  • Model Type: CNN
  • First Conv Layer : 1 in_channel, 4 out_channel, 3x3 kernels, padding=1
  • Second Conv Layer : 6 channels, 3x3 kernels, padding=1
  • Maxpooling Layer that reduces the dimesnion to 7x7x8
  • First Fully Connected Layer : 392 --> 16
  • Second Fully Connected Layer : 16 --> 10
  • ReLU activations are used throughout

Requirements

torch>=2.0.0
torchvision>=0.15.0
numpy>=1.24.0
pandas>=2.0.0
scikit-learn>=1.2.0
matplotlib>=3.7.0

Setup and Installation

  1. Clone the repository
git clone [your-repo-url]
cd [repo-name]
  1. Install dependencies
pip install -r requirements.txt

Training

Run the training script:

python src/train.py

Training parameters can be configured in config.yaml:

  • Batch size: 32
  • Learning rate: 0.001
  • Epochs: 10

Testing

Execute tests:

python src/test.py

GitHub Actions Pipeline

The ML pipeline is automated using GitHub Actions and consists of the following steps:

  1. Setup Environment

    • Checkout code
    • Setup Python
    • Install dependencies
  2. Training

    • Load and preprocess data
    • Train model
    • Save model artifacts
  3. Testing

    • Run unit tests
    • Validate model performance
    • Generate metrics
  4. Artifact Management

    • Save trained model
    • Store evaluation metrics
    • Upload artifacts

Pipeline Workflow

name: ML Training Pipeline
on: [push]

jobs:
  train:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Set up Python
        uses: actions/setup-python@v4
      - name: Install dependencies
        run: pip install -r requirements.txt
      - name: Train model
        run: python src/train.py
      - name: Test model
        run: python src/test.py

Project Structure

├── .github/
│   └── workflows/
│       └── ml-pipeline.yml
├── src/
│   ├── train.py
│   ├── test.py
│   └── utils.py
├── data/
│   ├── raw/
│   └── processed/
├── models/
│   └── saved_models/
├── config.yaml
├── requirements.txt
└── README.md

About

CI/CD pipeline with automated testing for model trained on MNIST dataset

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.