MLOps Pipelines with Vertex AI Pipelines

By Carlos Montiel | Enterprise AI Specialist
Leer en español →
Published: 2026-07-28 | By: Carlos Montiel | Reading time: ~4 minutes

A model trained by hand in a notebook is an experiment. A reproducible pipeline with full lineage is what separates an experiment from a production system.

What problem Vertex AI Pipelines solves

Vertex AI Pipelines is Google Cloud's serverless ML workflow orchestration service, based on the Kubeflow Pipelines (KFP) SDK or TensorFlow Extended (TFX). It lets you define a complete flow -- preprocessing, training, evaluation, model registration, conditional deployment -- as a reproducible, versioned graph of components, executed without the team having to manage its own Kubernetes cluster.

The difference versus running loose scripts or manual notebooks is traceability: every run is logged in Vertex ML Metadata, with full lineage of which dataset, which code version, and which hyperparameters produced each specific model.

Anatomy of a pipeline

A pipeline is defined as a Python function decorated with `@dsl.pipeline`, where each step is a component -- a containerized compute unit with typed inputs and outputs.

from kfp import dsl from kfp.dsl import component from google_cloud_pipeline_components.v1.custom_job import CustomTrainingJobOp @component(base_image="python:3.11") def evaluate_model(min_precision: float, metrics: dict) -> bool: return metrics["precision"] >= min_precision @dsl.pipeline(name="credit-scoring-pipeline") def credit_pipeline(dataset_uri: str, min_precision: float = 0.85): training = CustomTrainingJobOp( display_name="credit-training", worker_pool_specs=[{ "machine_spec": {"machine_type": "n1-standard-8"}, "replica_count": 1, "container_spec": {"image_uri": "gcr.io/my-project/trainer:latest"}, }], ) evaluation = evaluate_model( min_precision=min_precision, metrics=training.outputs["metrics"], )

This pipeline compiles to a portable JSON/YAML file and runs on Vertex AI with no persistent infrastructure: you only pay for compute during execution.

Prebuilt vs. custom components

Google maintains a `google-cloud-pipeline-components` library with ready-made operators for common tasks: launching an AutoML job, deploying a model to an endpoint, running batch prediction, or registering a model in Model Registry. For business-specific logic (custom data quality validations, particular transformations), you write custom components as Python functions packaged in a container, reusable across pipelines.

Traceability and reproducibility with ML Metadata

Every pipeline run automatically logs full lineage in Vertex ML Metadata: which dataset artifact went in, what parameters were used, what model came out, and what metrics it achieved. This answers the question that almost always comes up in an audit or a production incident: "what data and what code trained the model currently serving right now?", without depending on someone having manually documented the process in a separate spreadsheet.

Conditional deployment and quality control

A common pattern is conditioning production deployment on the model exceeding a metric threshold against the currently deployed model, preventing an automatic retraining from degrading the production system without human oversight.

with dsl.If(evaluation.output == True): ModelDeployOp(model=training.outputs["model"], endpoint=production_endpoint)

Scheduling and CI/CD

Vertex AI Pipelines integrates with Cloud Scheduler for periodic retraining (weekly, monthly) and with Cloud Build or GitHub Actions to trigger pipeline compilation and execution as part of a standard CI/CD flow when training code is updated in the repository. This turns retraining from a manual, ad hoc event into a versioned process just like any software deployment.

Costs and practical considerations

Vertex AI Pipelines doesn't charge for orchestration itself beyond a minimal per-run charge; the real cost is each component's compute (training, evaluation). The operational recommendation is keeping pipelines granular -- separating preprocessing from training from deployment -- so you can cache steps that didn't change between runs (KFP supports component output caching by default), reducing time and cost on frequent iterations where, for example, only the final hyperparameter changes.

Carlos Montiel
Enterprise AI Solutions Architect
Specialist in LLMs, Agents, and Orchestration
guatemalia.com/en/#contact · info@guatemalia.com

Need to implement AI at your company?

Carlos Montiel is an enterprise AI solutions architect. He implements LLMs, Agents, RAG, and orchestrators for companies across Guatemala and Latin America. Reach out for a consultation.

Contact Carlos Montiel

info@guatemalia.com