might have heard about sdlc which is
software development lifecycle
in this video we are going to discuss
mdlc which is a model development
lifecycle
we will also compare sdlc with mdlc
stlc is the process that is used to
build software
so just to give you example let's say
there is a grocery store chain called
kmart
and they want to build their ecommerce
website they will go to any it company
let's say i t company's name is infosys
and they will give the requirements of
how they want to build their ecommerce
website what kind of features they want
to have
and the business manager on the infosys
side
will collect the requirements so the
first stage in
sdlc is requirement gathering
after that the business manager will go
to engineering team
at infosys and he will discuss the
requirements and the engineering team
will work on a design and they will also
write code
to implement the actual website so after
requirement analysis comes the
implementation phase and then they give
a software to
a testing team or a qa team for doing
testing
so then comes the testing phase and then
the software gets deployed kmart users
will start using it they will have a
feedback
obviously then in the next
phase let's say they will say okay we
have built this basic e-commerce website
I want to have a product recommendation
feature
on this website so in that second phase
you'll have
product recommendation feature couple of
other feature bug fixes
and the whole cycle then repeats
that is why it is called cycle software
development life cycle because it's a
cycle
it's not like software you once build
it's done it's a continuous process
similarly there is a term emerging in
the field of AI which is called mdlc
or a model development life cycle in
here also
you have to follow certain steps
let's say you're trying to build a
product using AI or you're trying to
build
a model for doing data science
that project consists of similar steps
that we just saw for sdlc
and let's go over those steps really
quickly
any machine learning project starts with
problem statement where you try to
figure out
what problem you want to solve using
machine learning
so that comes requirement gathering
goals and
milestone and ROI analysis the business
manager will meet with the stakeholders
to figure out
okay if you are building a
recommendation engine for ecommerce
website
how exactly that engine is going to work
and
how it can help company bring more
customers or bring more revenues
in general how you can solve a specific
problem using machine learning
once the problem statement is clearly
defined with
goal milestone and ROI. ROI means
a return on investment then comes design
phase where business manager will go to
data scientist or machine learning
engineers and
talk about the problem that they want to
solve now as a data scientist and
machine learning
engineer it is your responsibility to
figure out first
is ML necessary for my project many
times
a problem can be solved using a
rule-based system or a simple software
or a regular expression in that case you
should not use machine learning
let's say you ruled out that possibility
and you think
using machine learning makes sense then
comes
what type of problem you're solving
whether it's a classification or
regression problem or a reinforcement
learning
then can you use a ready-made solution
for example you're trying to build a
chat board
can you use Google's dialogflow or
you're trying to work on image
classification problem can you use
google vision api.
if you can use ready-made solution then
you should definitely go for it if it
fits your budget
because it will save you a lot of time
then comes data collection phase let's
say I figure out okay I don't want to
use any red image solution
I want to train my own model then
for building any model a lot of training
data is required
now does that training data comes from
in-house or from outside
many times companies have in-house
databases you know mysql
or there could be document store or
mongodb
can we scrap all those databases and
prepare a data set that is
necessary to train my model if not
can we use external data can we buy data
from somewhere
or can we use web scraping to collect
data from the internet
then comes data annotation phase let's
say you are trying to do
name entity recognition in that you have
a lot of text
you want to tag specific entities
and you need annotation tool now do you
want to build that tool
in-house or just use ready-made tools
such as prodigy and super annotate
there are many data annotation tools
available in the market
right now so a business manager need to
carefully evaluate
all these tools and figure out if using
these tools makes sense in terms of
budget and timeliness
then comes data privacy concern because
we live in a world
where if you get into privacy issues you
will have a lot of
legal trouble for example Google I think
when they trained
bert model on various websites article
they got into lawsuit
because those websites publishing news
did not want their articles to be used
to train the bird
model so you have to be very very
careful about data privacy if
you want to get any legal things clear
around that
then that that's the first step you need
to take
after data collection comes model
training part so here now data
scientists and machine learning
engineers have
all of their data ready to train the
model
they will take that data set and they
will first think
whether they want to use statistical
machine learning or deep learning
if you have a structured data many times
using statistical learning makes sense
if you have unstructured data such as
audio video images then
deep learning makes more sense and deep
learning makes even more sense when
the volume of data is very very high
even in deep learning
if you are working on NLP type of
problem you will use RNN or
transformer based models if you are
using
if you are trying to solve image
classification problem then you will use
convolutional neural network
so data scientists and machine learning
engineers they know
which model to use in what circumstances
even first is
statistical machine learning let's say
you are trying to do classification you
can
use random forest decision tree
logistic regression there are many
methods so data scientists
will use all these methods and they will
do hyper parameter tuning
so they will have a couple of models
that they will try
they will use grid search cv and they
will use
cross validation to figure out the model
with the base score model that performs
the best
and then that model will be evaluated on
a test data set
test data set is the data set that is
not used in the training phase
and once it is confirmed that this model
with this xyz hyper parameters needs to
be used
they will export that model into pickle
file or whatever the file format is
and they will start deploying it so then
comes the deployment phase
in the deployment phase you need to
figure out
whether you want to use a simple flask
server
to serve the http request or you want to
use something sophisticated such as
TF serving. TF serving allows you to
tag your models you know dynamically
load specific version of your model it
has a lot of benefits
there are other serving frameworks as
well
you're obviously deploying this to a
cloud so when you deploy
it you need to think about
containerization docker is a popular
tool
so can we have a docker container
with our model and with all the
libraries installed and once you have a
container
you can deploy it in google cloud Amazon
Azure whatever your cloud provider is
and you need to obviously do artifact
management which means
I have this model version 1.1 then I
retrain now version 1.1
1.2 so 1.1 1.2 behaves in a different
way
you need to have a catalog that 1.2 was
trained on this particular data set
1.1 was trained on that particular data
set and
what was the model what was the hyper
parameter you need to have all that
metadata associated with an
artifact so you need to certainly do
that artifact management
and once the model is up and running
let's say it's serving the needs of
customer let's say
you build recommendation engine
for a e-commerce website now for
e-commerce website people are going on
the website
they are being shown the recommendation
now you need to
evaluate the performance of that model
in a production environment so you need
to do
live monitoring and for that you need to
uh have a lot of logs splunk is a
standard
software that people use for logging
then
you need to have alarms set up you know
if
there is an error that occurred or if
the model is not behaving in the right
way we can have proper alarms
installed and you need to measure the
accuracy of
inference and by doing that you will get
a good understanding of
how the model is performing in the wild
all of these steps can be automated if
you use the right set of
frameworks so nowadays there are ml
Ops frameworks available such as ML flow
Amazon sagemaker
qflow which is for kubernetes and these
platforms allow you to automate lot of
these processes that we talked about for
example if you go to Amazon stage makers
you will get lot of containers
pre-trained models
you will have tools for data annotation
it will automate a lot of the processes
that we already discussed
in your mdlc process
after monitoring comes free training
because once you monitor let's say
and then you found some issues now you
want to retrain the model
also you the data is ever evolving so
now
after one year you collected more data
let's say for product recommendation
engine you got
few new new products so now you need to
retrain that model you know
so it's like continuous training you
might have heard about ci
countries integration continuous
development similarly there is
continuous training city you know you
can call like city
and based on production monitoring and
changes business
changing business needs you need to
retrain
that model collect new data again
retrain
and then you need to really look at your
problem statement like how
what new features I want in my
in my model product basically and based
on that
you retrain then again it goes to design
phase because
now let's say my requirements are
changed my data is changed
previously I use decision tree now maybe
using random forest makes more sense so
in that case
data scientists are continuously engaged
and
you are kind of in a cycle you know you
are kind of in a circle
that's why it's called model development
life cycle you know the term cycle means
it's a cycle it's a continuous process
it's not like
once you build an AI product and you are
done you have to continuously
do the iteration monitor it and
continuously evolve the product and
that's what
mdlc is all about I hope you like this
video
if you learn something new please share
it with your friends
who can also learn what is mdlc and
thank you for watching if you have any
question please post in a
comment below