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.
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
- Access to DagsHub
- Access to GitHub Actions
- Python 3.9.1
- DVC 2.11
- CML
- You can find all the additional information in the
requirements.txt
file
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
.
The following graphics shows the performances of the models for different epochs.
- Epoch = 1
- F1 score = 0.89
- Precision = 0.88
- Recall = 0.85
- Epoch = 2
- F1 score = 0.92
- Precision = 0.90
- Recall = 0.91
Read the full article on my medium and Follow me for more content.