PRIYANKA VERGADIA: Did you know that 87% of data science
projects never make it into production?
That's just one out of every 10 AI projects.
So how do you make sure your project does not
become one of those 87%?
I'm Priyanka Vergadia, and in this video,
I will walk you through steps to operationalize your machine
learning workflow using vertex pipelines,
so your project becomes one of those 10 successful AI
projects.
We will look at MLOps framework and vertex AI pipelines, which
helps you break down the complex multi-step ML
workflow into a pipeline and ensure that each step runs
in a reproducible, auditable, cost-effective, and a scalable
way.
In contrast with typical software systems, which
are traditionally code-centric, ML systems
involve an intricate relationship between data,
code, and the models.
Now, data and models are unique artifacts
with their own dependencies and pitfalls.
And the joint management of these three artifacts
is a challenge in delivering and maintaining
production machine learning systems.
That is what MLOps is.
MLOps is a culture and practice that
aims to unify ML system development and operations
and guide through the challenges of taking
ML projects from experimentation to production.
It is just like DevOps, but for ML.
Hence, MLOps, which handles managing the life cycle
of data, models, and code.
Let's start with a high-level MLOps framework.
So the first step is ML development,
which is inherently experimental, where
data scientists and model builders
explore and transform the data sets,
explore different algorithms, train many models,
and then compare them.
Then the second step is continuous training.
Now, production training should be automatable and repeatable
so it can take new data or other triggers
and generate new and better models on demand.
And then the third step is model deployment,
which is really all about continuous integration
and continuous delivery.
This involves running A/B tests, evaluation
of model behavior in production, and then approving them
for releasing, following a rigorous, auditable, and even
reversible CIDC process.
And then lastly, it's continuous monitoring.
You need to continuously monitor your models
when they are running in production, because you
want to get a sense of how they are performing.
This is important to ensure the quality and business
continuity, but also crucial for getting high-quality signals
into how to improve a model for your next iteration.
Model management and governance is basically
the step that applies to all of these steps.
It's the entire framework.
We need traceability, verifiability, and auditability
at each stage of this workflow.
ML pipeline models this MLOps workflow.
A pipeline is a way of modeling a workflow
as a set of connected steps.
Each step takes as input the output of the previous step,
and performs some additional computations,
and then produces outputs that can be utilized
by the future components.
Now, here in this MLOps workflow,
to keep the spirit of experimentation
in the ML development phase, we recommend
using the reusable training pipelines.
And the reason for reusable pipelines
is because the data scientists can share components
amongst themselves, so they don't
have to start with a blinking cursor
and to rerun and iterate quickly to create those optimal models.
The output of this step would be the trained pipeline source
code, which you feed into the continuous training phase.
The pipeline generated earlier can
be now treated like a software application
and is version-controlled and deployed through CIDC process
as a training pipeline that can now
be invoked with new data or parameters
in production as needed.
Now, the output of this step would be your trained model.
And then the output of the model deployment
is your live predictions.
And these predictions can not just
be predictions, but also logs and other records
of production inferences.
Now, the output of continuous monitoring--
because you are monitoring the model continuously,
the output of this continuous monitoring
is those alerts that go out to the team,
so that they can continuously measure and monitor
what the model's performance is looking like-- is it degrading
or triggering rollbacks-- and retaining
A/B testing of any candidate models.
The model management and governance capabilities,
obviously, as I said earlier, span
across the entire framework, including
the features such as, model registry, model approvals,
and model provenance.
Now, what are vertex pipelines?
Vertex pipelines help you automate and monitor your ML
systems by orchestrating this MLOps workflow
in a serverless manner.
They are based on containers, which
help you make the MLOps process really portable and scalable.
And the vertex pipelines store the workflow artifacts
using vertex AI ML metadata, which makes it easier
to analyze the lineage of our workflow
and the items that are being created.
For example, an ML model's lineage
may include training data, the hyper-parameters, and the code
that we use to create the models, which
are critical pieces of information to understand
the changes in performance or accuracy of our ML systems.
Now, as you can imagine managing this metadata by yourself
in an ad hoc manner can be difficult and time-consuming,
and vertex pipelines makes it easy to do that.
Now, vertex pipelines support both Kubeflow pipelines
and also TensorFlow Extended.
Now, if you are already using TensorFlow,
TensorFlow Extended is a good choice for you.
It provides a rich set of components
that helps you take the TensorFlow code
and make it into an ML pipeline.
I did a video on TFX not too long ago,
which I will include in the description below.
Now, if you're not using TensorFlow,
then use KFP, which is an open-source machine learning
pipeline.
It offers a great deal of flexibility.
It's easy to plug in code from any ML framework,
including the normal frameworks that aren't Python-based,
such as Apache MXNet.
Now, you might ask, why do I need vertex pipelines
if I use Kubeflow pipelines already today?
Now, the biggest reason is that it is managed.
And because it is managed, you don't
have to maintain or create servers by yourself.
Now, when you're using KFP, you need
to build, scale, and maintain a Kubernetes cluster
all by yourself.
But with managed pipelines, we don't
have to do any of that work.
It's all serverless.
OK, so in this video, we got a quick overview
of MLOps workflow and vertex pipelines.
What's next?
Let's take a look at vertex pipelines demo
in our next video.
In the meantime, try out the codelab linked below,
and subscribe to get notified about the next video.