Skip to content

About

This project uses CI to train the model and upload it to the artifacts. This project also serves the models for client apps to predict the results

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

mlops-train-and-serve-model

This project implements a Continuous Training (CT) and Continuous Deployment (CD) pipeline using GitHub Actions.

Continuous Training

Every time a commit is pushed to the repository, the CT workflow is triggered to:

  1. Train: Run train/train_model.py to retrain the model on the latest code/data.
  2. Package: Save the trained model and metadata in the artifacts directory.
  3. Upload: Store the build artifacts for future use or deployment.

Continuous Deployment

Upon successful completion of the training workflow on the main branch, the CD pipeline is automatically triggered to:

  1. Fetch: Download the freshly trained model artifact.
  2. Build: Create a Docker image containing the application and the new model.
  3. Push: Publish the Docker image to the GitHub Container Registry (ghcr.io).

Usage

Train the model

python train/train_model.py

Local Prediction Test

python train/test_predict_model.py --input "[5.1, 3.5, 1.4, 0.2]"

Serve Locally (Flask)

python serve/app.py

Run with Docker

docker run -p 5001:5001 ghcr.io/vidon/mlops-train-and-serve-model:v0.0.1

About

This project uses CI to train the model and upload it to the artifacts. This project also serves the models for client apps to predict the results

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages