MLOps 101 – Before writing your first pipeline
You’ve been hearing a lot about MLOps (machine learning operations) and how it’s the key to success for any organization that wants to scale their machine learning initiatives. Cloud providers such as Google Cloud Platform and AWS offer machine learning tools and platforms for developers to build pipelines for automated machine learning models and monitor these models in production. To mention a few leading platforms and tool:MLOps is a continuous process
MLOps is a continuous process of model development and monitoring. This means that once you have developed a machine learning model, you need to continuously monitor it to ensure that it is performing as expected. The performance of the model in production is evaluated using unsupervised techniques to detect shifts in the data distrbution. AWS Sagemaker detects and alerts developers when there is drift in data or degradation in model performance. There are four main stages in the MLOps process: data collection, model development, model deployment, and monitoring.- Data collection is the first stage in MLOps. You need to collect data that will be used to train and test your machine learning model. In a typical MLOps pipeline, data versioning is practiced just like version control.
- Model development is the second stage in MLOps. This is where you develop your machine learning model using tools like Scikit-Learn, Pytorch or Tensorflow.
- Model deployment is the third stage in MLOps. This is where you deploy your machine learning model so that it can be used by others. You can either ship these models to the cloud using ZenML or deploy them on your local environment.
- Monitoring is the fourth and final stage in MLOps. This is where you monitor your machine learning model to ensure that it is performing as expected.
MLOps starts from model development experiments
In an MLOps pipeline, model development experiments are designed in such a way that they can be easily automated. This means that the process of developing and testing a new model can be streamlined, and new models can be deployed quickly and efficiently. Developing a new model in an MLOps pipeline typically involves the following steps:- Create a new experiment in the pipeline.
- Design different experiments with different hyper parameters.
- Run the experiment and collect data.
- Analyze the results of the experiment and decide whether or not to deploy the new model.
Visualize evaluation metrics in your MLOps pipeline
When working with MLOps, one of the first things you need to do is choose an evaluation metric. This metric will be used to determine which model is the best. Once you have chosen an evaluation metric, you need to log it so that you can view it later. This can be done using a tool like TensorBoard. After logging the evaluation metric, you can then view it to see which model is the best. You can also use this information to improve your models in the future.Models are deployed on cloud or on premises environment
There are two main ways to deploy models in an MLOps pipeline.- Cloud
- On Premises