
Image by editor
The MLOps market was estimated at $23.2 billion in 2019 and is projected to reach $126 billion by 2025 due to rapid adoption.
Many data science projects never see the light of day. MLOps is the process from the data stage to the deployment stage that ensures the success of machine learning models. In this post, you’ll learn about the key stages of MLOps (from a data scientist’s perspective) and some common pitfalls.
MLOps is a practice focused on operationalizing data science models. In most companies, data scientists are typically responsible for modeling dataset creation, data preprocessing, feature engineering, and finally model building. Models are then “thrown” over the wall into engineering teams and deployed to APIs/endpoints. Science and engineering are often siled, which can lead to slow deployments or, at worst, inadequate deployments.
MLOps address the following challenges deploy Enterprise-scale ML models accurately and quickly.
Equivalent to maxims in data science “Easier said than done” probably should be “Easier to build than to deploy”.
MLOps can be a silver bullet for the difficulties companies face in deploying machine learning models into production. For us data scientists, it’s no surprise to find that up to 90% of ML models are never deployed in production. MLOps bring discipline and process to data science and engineering teams to work closely and continuously. This collaboration is critical to ensuring successful model deployment.
For those familiar with DevOps, MLOps is to machine learning applications and DevOps is to software applications.
There are multiple types of MLOps, depending on who you ask. However, there are five key stages to a successful MLOps strategy. As an aside, a key element required as part of each of these stages is communication with stakeholders.
framework of the problem
Thorough understanding of business problems. This is one of the key steps to successfully deploying and using your model. Engage with all stakeholders at this stage to get buy-in for the project. Engineering, product, compliance, and more.
Solution framework
Only after the problem statement has been clarified can we proceed to consider the “how”. Do we need machine learning to tackle this business problem? As a data scientist, my suggestion to move away from machine learning may seem strange at first. it just “With great power comes great responsibility”. In this case, the responsibility is to ensure that the machine learning model is built, deployed, and monitored, and that the conditions are met. stay satisfied business requirements. Schedules and resources should also be discussed with stakeholders at this stage.
Data preparation
Once you decide to go down the machine learning path, start thinking about “data”. This stage includes steps such as data collection, data cleaning, data transformation, feature engineering, and labeling (for supervised learning). The adage to remember here is “trash in trash”. This step is usually the most painstaking step in the process and is critical to ensuring the success of the model. Validate data Run functions multiple times to ensure they are consistent with your business problem. Document all of the many assumptions you made when creating the dataset.Example: What are the feature outliers? actual Outlier?
Model building and analysis
At this stage, we build and evaluate multiple models and choose the model architecture that best solves the problem at hand. The metric you choose for optimization should reflect your business requirements. There are now many machine learning libraries that can help expedite this step. Remember to record and track your experiments. Reproducibility of the machine learning pipeline.
Serving and monitoring models
Once you’ve built your model objects in the previous steps, you need to figure out how to make them “available” to your end users. Response latency should be minimized while maximizing throughput. Common options for serving models include REST API endpoints as Docker containers on the cloud or edge devices. Model objects are very dynamic in nature, so you can’t celebrate them yet after you deploy them. For example, data drift in production can lead to model collapse, or hostile attacks against the model. Machine learning applications require a robust monitoring infrastructure in place. There are two things to watch for here.
- Deployment health (load, usage, latency, etc.)
- The health of the model itself (e.g. performance metrics, output distribution).
The frequency of the monitoring process should also be determined at this stage. Do you monitor your ML applications daily, weekly, or monthly?
A robust machine learning application is now built, deployed, and monitored. But unfortunately the wheels don’t stop spinning as the above steps have to be repeated continuously.

The MLOps Cycle for Successful Data Science Projects | Image by Author
To put the above five steps into practice, this section will guide you through Data scientist at a FinTech company.Responsible for implementing fraud models to detect fraudulent transactions.
In this case, start by digging deeper into the type of fraud you’re trying to detect (first-party or third-party). How are transactions determined to be fraudulent? Are they reported by end-users? Or should heuristics be used to identify fraudulent activity? Who uses the model? Will it be used in real time or in batch mode? Answers to the above questions are critical to solving this business problem.
Now let’s figure out what is the best solution for this problem. Do we need machine learning to deal with this, or can we start with simple heuristics to deal with fraud? Is all fraud coming from a small number of IP addresses?
When building a machine learning model (assuming supervised learning in this case), you need labels and features. How do you deal with missing variables? What about outliers? What is the fraud label observation window? Do you have a data warehouse that you can build on? Always validate your data and functionality before proceeding. This is also a good time to discuss the direction of the project with stakeholders.
Once you have the data you need, build the model and perform the analysis you need. Make sure your model metrics match your business usage. (Example: In this use case, you can call it in the first decile). Does your chosen model algorithm meet your latency requirements?
Finally, coordinate with engineering to deploy and serve the model. Fraud detection is a highly dynamic environment, and fraudsters strive to stay ahead of the system, so monitoring is critical. Develop a monitoring plan for both data and models. Measures such as the PSI (Population Stability Index) are common for tracking data drift. How often do you retrain your model?
By using machine learning (where appropriate) to reduce fraudulent transactions, you can now successfully create business value.
We hope this article has helped you understand the benefits of implementing MLOps in your company. In summary, MLOps ensures that data science teams:
- solve pertinent business issues
- Use The Right Tools to Solve Problems
- use a dataset representing the problem
- building Best machine learning model
- And finally Deployment and monitoring Guaranteed model continuation success
But be aware of common pitfalls so that your data science project doesn’t become a tombstone in the data science graveyard. Remember the fact that data science applications live and breathe. Data and models should be continuously monitored. AI governance should be considered from the beginning, not an afterthought.
With these principles in mind, I believe that machine learning can be leveraged (if desired) to create real business value.
MLOps reference
Natesh Bab Arunachalam Data Science Leader at Mastercard, currently focused on building innovative AI applications with open banking data.
