Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel
Zoumana Keita 2bec8ed62f
Update config.yaml
1 year ago
ee9d73ee3c
Adding the configuration file
1 year ago
abee4e219f
Update training.yaml
1 year ago
a287d902e8
model and data folders
1 year ago
86dbf954fe
Before and after pull request mlflow results
1 year ago
a287d902e8
model and data folders
1 year ago
a287d902e8
model and data folders
1 year ago
a287d902e8
model and data folders
1 year ago
b9dada34b6
Update README.md
1 year ago
2bec8ed62f
Update config.yaml
1 year ago
a287d902e8
model and data folders
1 year ago
dde55c77dd
Update get_data.py
1 year ago
a287d902e8
model and data folders
1 year ago
1585433615
Add files via upload
1 year ago
e80f37fc91
Add files via upload
1 year ago
25eacc0dd3
Update train_model.py
1 year ago
Storage Buckets
Data Pipeline
Legend
DVC Managed File
Git Managed File
Metric
Stage File
External File

README.md

You have to be logged in to leave a comment. Sign In

How to Use an AWS EC2 instance as Self-hosted Runner for Continuous Machine Learning.

DagsHub + Actions + EC2 + CML

Main Concepts Covered

After completing this repository, you will be able to understand the following concepts:

  • Provision an AWS EC2 and running the training of a BERT model with CML
  • Implement a Github actions pipeline using the previous instance.
  • Automatically log your models metrics with MLFlow.
  • Automatically save your training metadata on DVC for easy tracking.

MLOps Workflow

Getting started

1. Prerequisites

Platforms

AWS EC2 instance properties

A free tier is enough for this use case. Below are the properties of the EC2 instance used for the use case.

  • cloud type: t2.micro.
  • cloud-region: us-east-1a
Other platforms

Other ressources

  • Python 3.9.1
  • DVC 2.11
  • CML
  • You can find all the additional information in the requirements.txt file

Results On DagsHub

DagsHub provides the capabilities to use MLFlow and DVC while giving the choice of working on Github. The following results are the experiments from DagsHub, using MLFlow to track the model F1-Score, Precision and Recall.

MLFlow metrics before and after pull request.

The following graphics shows the performances of the models for different epochs.

Before the pull request:

  • Epoch = 1
  • F1 score = 0.89
  • Precision = 0.88
  • Recall = 0.85

After the pull request:

⚠️ Beware that the wall time for 1 epochs training is 2h45 minutes. So might expect the double for two epochs.

  • Epoch = 2
  • F1 score = 0.92
  • Precision = 0.90
  • Recall = 0.91

Metrics before and After pull request

Full Article On Medium

Read the full article on my medium and Follow me for more content.

Tip!

Press p or to see the previous file or, n or to see the next file

About

No description

Collaborators 1

Comments

Loading...