Key takeaway
- DevOps for machine learning for enterprise teams: CI/CD and continuous training, DVC and Airflow, validation gates, retraining triggers and governance.
DevOps for machine learning means extending CI/CD so that data, models and training pipelines are versioned, tested and released with the same discipline as code. Google's MLOps guidance describes the extra piece as continuous training (CT), which it calls "a new property, unique to ML systems", concerned with automatically retraining and serving models. For an enterprise, the question is not which framework to pick but how often a model can be retrained, validated and promoted without manual steps.
This guide covers the pipeline stages, the tools that fit each stage, the checks a model must pass before release, and where governance belongs. It is the delivery-pipeline view; for the wider discipline see our guides on MLOps processes and tools and ModelOps vs MLOps, and for the software side see CI/CD pipeline stages, tools and best practices.
Why does machine learning need its own DevOps practice?
A conventional application changes when developers change code. A model changes when the code, the training data or the real world changes. Google's guidance notes that testing an ML system is "more involved than testing other software systems", and that continuous integration "is no longer only about testing and validating code and components"; it also covers data and models. Models also decay as data shifts, so a model that passed every test at release can still lose accuracy later.
| What is versioned or tested | Conventional DevOps | DevOps for ML |
|---|---|---|
| Source code | Yes | Yes (training, feature and serving code) |
| Training data and features | Rarely | Yes, with schema and value checks |
| Model artefacts | Build output | Versioned, registered and compared with the current model |
| Pipeline itself | Build and release scripts | Training pipeline deployed as a product |
| Behaviour in production | Uptime and errors | Uptime plus drift and accuracy |
What does a CI/CD and CT pipeline for ML contain?
Google describes three levels of automation. At level 0 every step is manual, including data analysis, preparation, training and validation. At level 1 the goal is "to perform continuous training of the model by automating the ML pipeline", adding automated data and model validation, pipeline triggers and metadata management. At level 2 a "robust automated CI/CD system" builds, tests and deploys the pipeline components themselves. Most teams should reach level 1 before investing in level 2.

How do you version code, data and models?
Git versions code well but is a poor fit for large datasets and model files. DVC describes itself as designed for "Git-based data and model versioning": large files stay out of Git, small metadata files are committed in their place, and a dataset version is switched with git checkout followed by dvc checkout. DVC remotes can be local directories or external storage such as Amazon S3, NFS, SSH, Google Drive, Azure Blob Storage and HDFS. DVC also describes itself as a build system for reproducible, data-driven pipelines, and supports experiment tracking.
How do you package and orchestrate training?
Apache Airflow is a platform to "programmatically author, schedule and monitor workflows", with pipelines defined in Python and a web interface showing task status and logs. It suits scheduled retraining that chains data preparation, feature extraction and training. Container images keep the training and serving environment identical from laptop to cluster, and Kubernetes can run many training jobs in parallel. Managed services cover the same ground; Azure Machine Learning, for example, lists reproducible pipelines, model registration, monitoring and lineage logging as its MLOps capabilities (Microsoft Learn, last updated 6 October 2025).
What should trigger a retrain?
Google lists five triggers: on demand, on a schedule, on the arrival of new training data, on noticeable performance degradation, and on concept drift, when the distribution of feature data shifts significantly. Choose the trigger from the cost of a wrong prediction. A fraud or pricing model may need drift triggers; a stable internal classifier may only need a monthly schedule.
| Pipeline stage | Typical tool | When it fits |
|---|---|---|
| Code versioning | Git | Always; branches and tags for releases |
| Data and model versioning | DVC | Datasets and models too large for Git |
| Orchestration | Apache Airflow | Scheduled, dependent training and validation jobs |
| Packaging | Docker, Kubernetes | Identical environments and parallel training |
| Experiment visualisation | TensorBoard | Tracking loss and accuracy, viewing the model graph |
| Managed alternative | Cloud ML platforms | Teams that prefer to buy pipelines, registry and monitoring |
Does the framework matter: TensorFlow or PyTorch?
For the pipeline, much less than the stages above. TensorFlow's own guide says that graph execution "enables portability outside Python and tends to offer better performance" than eager execution, and that tf.function builds graphs from Python functions; eager mode remains available for debugging. TensorBoard is described as a suite of visualisation tools for TensorFlow programs, covering metrics such as loss and accuracy and the model graph. Whichever framework a team uses, the CI/CD, versioning and testing requirements are the same, so standardise on the pipeline and let teams choose the framework per use case.
How do you test and validate a model before release?
Google separates data validation from model validation. Data validation checks for schema skews, which should stop the pipeline for investigation, and value skews, which are significant changes in the statistical properties of data and should trigger retraining. Model validation compares the evaluation metric of the newly trained model with the current model before promotion, and can add online canary or A/B testing. See our guide to ML model deployment testing for the test types in more detail.
- Feature checks: values within expected thresholds, feature importance against the previous run, and data-compliance rules.
- Accuracy test: score the candidate on unseen data and promote only if it meets the threshold and beats or matches the current model.
- Operational test: memory use and inference latency within the serving budget.
- Code checks: unit tests and static analysis for feature and training code.
How do you deploy and monitor models in production?
A common pattern is to save each approved model to object storage or a registry, then let a deployment job roll the new version out to Kubernetes, keeping the previous version available for rollback. Google adds that at higher maturity the unit being deployed is the whole training pipeline, not a single model. Monitoring should compare live inputs and outputs with training data and alert on degradation, which feeds the retraining triggers above. Our continuous delivery of machine learning pipelines use case describes how we approach this for clients.
What does governance add to the pipeline?
Microsoft's documentation highlights lineage logging for governance, such as who published a model, why changes were made and when it was deployed. Treat these as pipeline requirements, not paperwork: every promotion should record the code commit, data version, evaluation results and approver. As teams add AI agents on top of models, the same discipline applies to agent actions. ElixirData Context OS keeps governed context, versioned policy and decision traces in one decision layer above AI agents, and AgentQA provides automated quality assurance for AI before outputs reach users.
What are the trade-offs and when should you not build this yourself?
- One or two stable models retrained a few times a year rarely justify a full level 2 pipeline; a scripted level 1 pipeline with versioned data is enough.
- Self-assembled stacks (Git, DVC, Airflow, Kubernetes) give control but need platform engineers to run them; managed ML platforms trade control for speed.
- Automated retraining without validation gates can push a worse model to production faster; the gates matter more than the automation.
In what order should you adopt it?
- Put code, data and model versions under version control and record them with every run.
- Automate the training pipeline end to end (level 1), with data and model validation.
- Add monitoring and choose retraining triggers.
- Automate build, test and deployment of the pipeline itself (level 2).
- Add approval and lineage records for governance. For the delivery process behind this, see DevOps process and lifecycle.
To map one ML release decision your agents should make, and the context and policy it depends on, book a Context Workshop. See what happens in the workshop.
Frequently asked questions
What is DevOps for machine learning?
It applies CI/CD to code, data, models and training pipelines, and adds continuous training so models are retrained and revalidated automatically.
How is it different from conventional DevOps?
ML systems need data and model validation as well as code tests, and models decay as data changes, so monitoring and retraining are part of the pipeline.
Why not use Git alone for models and data?
Git is poorly suited to large files. Tools such as DVC keep large files in external storage and commit small metadata files to Git.
What triggers model retraining?
Google lists on demand, on a schedule, on new data, on performance degradation and on concept drift.
Does the choice of TensorFlow or PyTorch change the pipeline?
The versioning, testing, deployment and monitoring stages are the same for either framework, so standardise the pipeline rather than the framework.
Follow XenonStack on LinkedIn: XenonStack on LinkedIn for new guides on agentic AI, data and platform engineering.
Ready to put AI agents to work? Explore ElixirClaw, the agentic OS platform to build, orchestrate and govern AI agents.
Explore the XenonStack platform family: ElixirData · ElixirClaw · ElixirHub · NexaStack · MetaSecure · Neural AI · AgentGRC · AgentSRE · AgentAnalyst · AgentInstruct · AgentRAI · AgentScrum · AgentSearch · AgentForce · AI Aviator · SAIF Aviator · CohortIQ · XenonStack AI · XenonStack UAE