For the complete documentation index, see llms.txt. This page is also available as Markdown.

MLOps with Harness

Understand how Harness CI and CD map onto the machine learning lifecycle, and which Harness capability covers each MLOps stage.

MLOps (Machine Learning Operations) applies DevOps practices to the machine learning lifecycle, covering data preparation, model training, validation, deployment, and monitoring. It addresses problems that traditional software delivery does not face, such as data drift, model decay, and reproducing a result from a specific combination of code, data, and parameters.

Harness treats a model as another artifact moving through a governed pipeline. You train and test models in Harness CI, enforce policy and security gates before promotion, deploy models with Harness CD, and monitor them after release.


What you will learn from this topic

  • MLOps and DevOps: How the two practices differ, and which parts of your existing delivery pipeline carry over to models.

  • Harness coverage by lifecycle stage: Which Harness module or feature serves each stage of the MLOps lifecycle.

  • Pipeline anatomy: What a Harness MLOps pipeline contains, from training through deployment.

  • Platform integrations: How Harness connects to Azure ML, AWS SageMaker, Databricks, Google Vertex AI, and MLflow.

  • Boundaries: Which MLOps responsibilities Harness does not cover, and what you pair it with.


MLOps and DevOps

DevOps integrates development and operations to automate delivery from code commit to deployment. It relies on continuous integration, continuous delivery, infrastructure as code, and monitoring to produce rapid iteration and accountability.

MLOps extends those practices to machine learning. It adds data engineering, model development, and model governance to the workflow, so teams develop, deploy, and manage machine learning applications at scale. The additions matter because a model depends on more than its source code: the same code trained on different data produces a different model, and a model that performs well at release degrades as production data shifts away from its training distribution.

The practical consequence is that a model pipeline versions three things instead of one: code, data, and the trained model itself. Go to MLOps best practices to review the practices that keep those three in sync.


The MLOps lifecycle

A typical MLOps project lifecycle includes five stages:

  1. Exploration: Problem framing, data collection, and data exploration.

  2. Development: Feature engineering and model training.

  3. Model validation: Accuracy, fairness, and regression checks against a held-out dataset.

  4. Model deployment: Packaging the model and serving it behind an endpoint.

  5. Monitoring: Performance monitoring, drift detection, and feedback loops.

DevOps complements MLOps rather than replacing it. The following diagram shows an application flow that combines both:

Diagram of an MLOps process combined with a DevOps application delivery flow

Harness coverage by lifecycle stage

Harness does not own the data science work in stages 1 and 2. It owns the automation, governance, and delivery around them.

Lifecycle stage
Harness capability

Exploration

Outside Harness. Data scientists work in notebooks and their chosen ML platform.

Development (training)

Harness CI runs training as a pipeline step, either directly or through a platform integration.

Model validation

CI Run steps for accuracy and fairness tests, Harness STO for scanning the model image, and Policy as Code to fail a pipeline when a model misses a threshold.

Model deployment

Harness CD for serverless, container, and Kubernetes targets, with approval steps before production.

Monitoring

Triggers and scheduled pipelines for retraining and freshness checks, plus your own observability stack for drift and performance.

Governance runs across every stage. RBAC controls who promotes a model, and audit trails record who did it.


Anatomy of a Harness MLOps pipeline

The following examples come from a credit card approval model. To run them yourself, you need:

If you do not have a Harness account yet, create one for free at app.harness.io.

Model training

Data scientists work in any framework: TensorFlow, PyTorch, scikit-learn, Keras, Jupyter Notebook, pandas, NumPy, or Matplotlib. Harness runs their training code without prescribing the toolchain.

This Run step installs dependencies, executes the notebook as a test to confirm it still produces a valid model, and writes the serialized model to the workspace so later steps can package it:

Training can also run on a managed ML platform instead of on the build machine. Go to Integrate ML platforms with Harness CI to configure Azure ML, AWS SageMaker, Databricks, Google Vertex AI, or MLflow.

Model packaging and deployment

Deployment makes a model available to applications so it can return predictions on new input. The path runs from feature engineering, through export to a portable format such as pickle, joblib, TensorFlow SavedModel, or ONNX, to a served endpoint.

Harness deploys to servers, containers, and serverless functions on Docker Hub, AWS, Google Cloud, Azure, and more. The following example uses Amazon ECR as the model registry and AWS Lambda as the serving target. You need your cloud provider credentials to deploy and serve models.

The step order matters: build the training image, test against that image, then build the inference image, and deploy only after the inference image exists.

YAML example: Deploy a model to AWS Lambda

The integration test step tolerates failure only if your workflow treats notebook test failures as advisory. Remove any Ignore failure strategy before you promote a model to production, otherwise a failing accuracy test permits the deployment it was added to prevent.

Model monitoring

Monitoring a production model covers reliability, prediction quality, and continued alignment with business goals. In practice it means setting KPIs, watching infrastructure, detecting drift, tracking model performance, alerting on regressions, running A/B tests, and deciding when a model is stale enough to retire.

Harness contributes the automation: scheduled pipelines that retrain on a cadence, triggers that rebuild on new data, and notifications when a model exceeds a freshness threshold. The following video demonstrates training, deploying, and monitoring a credit card approval model:


What Harness does not provide

Harness orchestrates and governs an MLOps workflow. It is not a data science platform, so pair it with tools that cover these responsibilities:

  • Model registry: Harness has no dedicated model registry. Use your ML platform registry, such as the MLflow Model Registry or the SageMaker Model Registry, or store model images in a container registry.

  • Feature store: Feature engineering and feature serving stay with your ML platform.

  • Drift and quality detection: Harness triggers retraining, but the drift signal itself comes from your monitoring stack or your ML platform.

  • Experiment tracking UI: Use MLflow Tracking or an equivalent. Go to Integrate ML platforms with Harness CI to run MLflow Tracking from a pipeline.

  • Notebook development: Harness runs notebooks as pipeline steps but does not host an interactive notebook environment.


FAQs


Next steps

Start with the platform integration that matches your ML stack, then work through the end-to-end tutorial to see a complete governed pipeline.

Last updated

Was this helpful?