Gear Up to Automate Your Machine/Deep Learning Model
MACHINE LEARNING+ DEVOPS = MLOps.
What is Machine /Deep Learning?
Machine Learning is the field of study that provides computer without being explicitly programmed and Deep Learning is the part of ML family that helps the computer to perform the human like tasks when we provide data to computer to it.
What is Devops?
DevOps is again made up of Development and Operations.This process helps the company to serve the client in a better and agile manner. DevOps made continuous integration and continuous delivery possible.It shortens product development cycle.
So Here I am to perform a practical to integrate Deep learning model with DevOps.
I have made up a model from mnist dataset and tuned up the hyper parameters automatically to get better accuracy and when my model was successfully created I delivered the report to admin that the “model is successfully created” and automation of this setup is done through Jenkins(a very famous open -source tool that works on JAVA ).
So Lets start with the FIRST JOB
- JOB1 → In my first job all I have done is downloaded the code I have created in my local system and pushed it to github and then copied it to my jenkins server and build a trigger i.e Poll SCM so whenever there is any change in git repo I will get it on my server in no time.
So this mark the completion of Job1. Let’s begin Job2.
2. JOB2 → Firstly we need a dockerfile to build up the the image to launch our desired Operating System.
Now chain the jobs so that it maintains the flow of our setup.
Now launch the OS using the shell provide in jenkins.
3. JOB3 → In this job I trained my model to get the accuracy.I also provided the trigger so that my job6 can monitor my job3 and ask it to relaunch the container whenever one container face some failure and also chain the job2 with job3 .
4.JOB4 →Here I chained my Job3 with Job4 and copy my output to a file called output.txt saved in my jenkin’s workspace.My output contains the accuracy I get .As in my model I have applied a condition whenever i get the accuracy more than 90% that means my best model has been created.
5.JOB5 →My Job5 is to send a confirmation mail to admin that your model is succcessfully created.In this I used a python code and import smtplib to send mail and automate it through jenkins.
6. JOB6 → So this job do monitor the process and if failure takes place in the present container it triggers to launch new one.
And this marks the completion of my setup.This would not have been possible without the guidance and teachings of Mr. Vimal Daga and thank you all to read it.