
Many data science teams can relate to the following scenario. An ML model is perfect in a notebook. Stakeholders are thrilled by its accuracy. Months later the business is still excited by its output. But then the model is deployed and soon starts to malfunction for unclear reasons.
Whilst the model was fine, the process surrounding it was the real issue.
MLOps is essentially applying best-practice processes (such as version control, testing and deployment along with monitoring) developed for software, to ML. This is more complex than for software as both the data and the code continue to evolve.
Below is a practical, step-by-step guide showing how we implement MLOps. We avoid dogma and concentrate on effective solutions.
Unlike traditional software, which functions in a static manner (until new code is introduced), ML is influenced by data. And data continues to change in the real world.
Demand modelling built pre-festival will show different consumer behaviour post-festival. Last year’s fraud detection model may struggle to detect this year’s novel fraudulent behaviour. Similarly a factory’s defect detection model will encounter new raw materials supplied by a new supplier which are just slightly different.
As well as having to manage code, therefore, MLOps lets you control both the data and the resulting model.
Answer key business questions to inform the implementation:
All of these considerations directly influence the technical approach adopted. Very different infrastructure will be needed for batch models re-trained monthly versus those provided via an API in real time, handling thousands of calls per minute.
Without the ability to re-create something, you cannot trust, test or audit it. There are three elements to versioning:
In six months’ time, can a team member state definitively which data and code were used to generate the currently live model and subsequently reproduce this? If not, begin here.
Although excellent for analysis, notebooks are ineffective for production due to issues such as non-reproducibility, non-sequential cell execution and human intervention. Models cannot therefore generally be reliably re-created.
Define a pipeline comprising distinct elements – data retrieval, validation, feature engineering, model training, testing and packaging. Each element should be able to function independently as a script or module, accepting specific inputs and producing specific outputs.
These can then be executed sequentially using pipeline orchestration tools such as Airflow, Prefect, Kubeflow Pipelines or well-structured workflow automation. Execution can also be time-based or event based (for example, on receipt of fresh data).
Poor data can stealthily negatively affect models. Include data validation within your pipeline. For example:
On detecting an issue, halt the pipeline and notify someone. It is vastly less costly to identify and address poor data quality pre-training than to subsequently have to justify to the CFO why a model has performed poorly.
Whilst a newly developed model must be tested, it also needs to ‘earn’ a production slot. Define testing criteria:
Only models that successfully complete all tests move forward. All others are recorded so that the team can analyse them.
Whilst many teams nervously await deployment, it need not be so stressful.
Firstly, ‘containerise’ your model (typically using Docker) to ensure it operates consistently. Then, deploy using a method that reduces risk. Options include;
Regardless of the deployment method adopted, define and test a simple, unified rollback procedure. You’ll be thankful for this at some point!
Beyond ensuring that the model server is operational, there are three areas to monitor:
As with data, the business owner, not just the data team, should define thresholds for when to be notified. Whereas a slight fall in model accuracy may be tolerable for a marketing model, this would not be the case for a credit model for example.
Issues can be identified through monitoring and re-training can then resolve them. Depending on the situation, re-training can be:
As pipeline, versioning and testing procedures are already in place, re-training can then easily become a regular, managed activity. This is the true advantage of correctly completing earlier steps.
Whilst it is not essential to invest in a costly proprietary solution, a strong open source technology stack will largely meet enterprise requirements. This comprises version control (Git), data and model versioning (DVC), model testing (MLflow) along with pipeline orchestration, containerisation (Docker) and/or a simple container host. Monitoring is supported by Prometheus and Grafana.
For Indian enterprises dealing with sensitive information, this technology stack is also happily implemented on-site or within a private cloud. Training data, models and predictions are all contained within an enterprise’s environment. This facilitates easier compliance with the DPDP Act and relevant industry regulation.
| Level | Description |
|---|---|
| 0: Manual | Notebooks with manual workflows. Models are deployed manually. |
| 1: Pipeline | Automated model training. Data and models are versioned. |
| 2: Automated deployment | Testing is undertaken. Models are containerised and deployed using secure methods. |
| 3: Continuous | Data drift is monitored. Retraining is automatically instigated where necessary. Full auditing is carried out. |
Most organisations do not need to immediately adopt level 3 maturity. Achieving level 2 maturity for key models provides the majority of benefit.
Across industries, we commonly observe the following errors:
By avoiding these four points, you have already largely avoided the main challenges that impede ML progress.
Good MLOps implementation is not about adopting a technology platform. Rather it is about enabling consistent model development, secure deployment and effective visibility of a model’s production operation. Ensure that data, models and experiments are all versioned. Create pipelines. Implement testing. Monitor for data drift and routinely undertake model re-training.
Swaran Soft has been delivering enterprise software for over 25 years. We assist teams to transition ML and agentic AI from prototype to production, utilising open source technology to avoid vendor lock-in. Typically this is achieved within an 8 week fixed fee trial.

AI Architect and Entrepreneur building India's Edge AI ecosystem. 25+ years in enterprise technology. Founder of Swaran Soft, Gignaati, and Copilots.in.