Git theta based continuous integration of ML models
- Git-Theta - Instructions to install
- Deepchecks - Instructions to install
- Pytorch - Instructions to install
ModelCI can be used for automated vetting and integration of machine learning models. Currently, only image classification models are supported.
- Clone the git repository
git clone https://github.com/brijml/ModelCI.git - Create a new local branch
git checkout -b <branch-name>
- Train an image classification model on a dataset.
- Use
deepchecks-suite.pyto execute the test suite locally on the model that includes,- Class Performance Check - Measure the Precision and Recall score for each class and pass the check if the values cross 0.2 for every class.
- Simple Model Performance - Measure the F1 score for every class for the model and a simple model which predicts the class randomly and pass the check only if the gain i.e. the ratio (model score - simple score/ perfect score - simple score) is above 0.99 for every class.
- Weak Segments Performance Check - Measure model accuracy for different range of image property values like the mean brightness.
We make use of Github Actions to execute the same test suite in an ubuntu container upon every push of the code.
- Save the model and use Git-theta for tracking the model (Instructions Here!])
- Add and Commit the model
git add model.pt git commit -m "<comnit-message>" - Merge the branch with the main branch
git checkout main git merge <branch-name> - Push the model to the github repo
git push origin main - Upon model push, Github Action Workflow will execute the
deepcheck-suite.pyand upload the artifacts to Github - The running workflow can be viewed here
- Click on the
buildjob and locate theArchive the Deepcheck Resultsstep to download the artifacts to your desktop to view the results