All Projects
GoogleFeb 2015 – Aug 2021Google-scale ML infra

ML Infrastructure & Training Pipelines

Production ML infrastructure for training and deploying speech recognition, computer vision, and recommendation models at scale — building the systems that let research teams productionize experimental models safely.

TensorFlowPythonDistributed SystemsGPU ClustersML PipelinesModel Serving

Overview

At Google, I worked as a backend and ML infrastructure engineer across two teams: first on internal developer tooling (2013–2015), then on ML infrastructure for speech recognition, computer vision, and recommendation systems (2015–2021).

My core work was building the plumbing that connects research to production: training pipelines that could run reliably at scale, deployment systems that let teams ship model updates safely, and the monitoring infrastructure that kept production models healthy.

Problem

Research teams at Google produce experimental models constantly, but moving those models from a research notebook to a production service is hard. Training runs on large datasets are brittle — they fail mid-run due to hardware issues, data pipeline errors, or resource preemption. Deploying a new model version carries risk: if the new version degrades quality or introduces latency regressions, there's no fast rollback path. Model quality in production drifts silently — without continuous evaluation against ground truth, you don't know a model has degraded until users report problems.

Solution

I worked on fault-tolerant training pipelines using TensorFlow and Google's distributed infrastructure, with checkpoint-based recovery so interrupted training runs could resume from the last saved state rather than restarting from scratch. For deployment, I built canary rollout systems that gradually shifted traffic from old to new model versions while monitoring quality metrics — automatic rollback if metrics degraded. For monitoring, I built evaluation pipelines that ran continuously against held-out test sets and triggered alerts on quality regressions.

Architecture

Training DataGCS / ColossusTF TrainingGPU / TPU clusterModel RegistryVersioned + evalServingCanary rolloutpasses evalpromoteCheckpoint-based fault tolerance · Canary deployment with automatic quality-based rollback

Raw training data flows from distributed storage through preprocessing pipelines into GPU training clusters. Trained models are evaluated, registered, then deployed via canary rollout with automatic quality-based rollback.

Data flows from distributed storage (Colossus/GCS) through preprocessing pipelines that normalize, shard, and cache training data into TFRecords. Training jobs run on GPU/TPU clusters managed by internal schedulers; checkpoints are written to distributed storage at configurable intervals. After training, models go through automated evaluation before being written to a model registry. A canary deployment system routes a percentage of production traffic to the new model, comparing quality and latency metrics before full rollout. Prometheus-based monitoring tracks inference latency, error rates, and model quality metrics.

Components

Data Preprocessing Pipeline

Distributed pipeline that ingests raw training data from GCS/Colossus, normalizes and augments it, and writes sharded TFRecord files optimized for training throughput

TF Training Cluster

GPU/TPU training jobs managed by internal schedulers; fault-tolerant with checkpoint-based recovery; supports both synchronous and asynchronous distributed training strategies

Model Registry

Versioned store for trained model artifacts; tracks lineage (training data, hyperparameters, evaluation metrics) for each version; gates promotion to production on evaluation thresholds

Canary Deployment System

Gradually shifts production traffic from incumbent to challenger model; monitors quality and latency metrics; triggers automatic rollback if SLOs are breached

Continuous Evaluation Pipeline

Runs trained models against held-out test sets on a schedule; publishes quality metrics to monitoring dashboards; alerts on regressions relative to baseline

Serving Infrastructure

Low-latency model serving with GPU-accelerated inference; supports A/B testing; integrated with canary deployment controller for gradual rollouts

Execution Flow

Execution Flow

Raw DataGCS / Colossus
PreprocessTFRecords
TrainGPU / TPU cluster
EvaluateHeld-out test set
RegistryVersioned artifact
CanaryGradual rollout
Step 1 of 6: Raw DataGCS / Colossus

Key Technical Decisions

Large model training runs take hours or days. Hardware failures and resource preemption are expected events at Google's scale — not edge cases. Designing training jobs to checkpoint state every N steps and resume from the latest checkpoint turned expensive restarts into cheap recoveries, dramatically improving training throughput and researcher productivity.

Reliability & Scaling

  • Checkpoint-based training recovery: interrupted training jobs resume from last checkpoint rather than restarting, tolerating hardware failures and resource preemption

  • Canary deployment with automatic rollback: new model versions receive a fraction of traffic; automatic rollback if latency or quality SLOs breach

  • Continuous evaluation pipelines running against held-out test sets; alerts on model quality regressions

  • Distributed training with synchronous gradient aggregation; straggler mitigation to prevent slow workers from blocking the training step

  • Data pipeline validation: malformed or out-of-distribution training examples detected and quarantined before reaching training jobs

  • Serving infrastructure with redundancy across availability zones; model updates deployed with zero downtime via rolling deploys

Impact

Impact Metrics

Training Throughput 0% improvement
Failed Training Restarts 0% reduction
Inference Latency 0% reduction
Deploy Safety Coverage 0% canary rollout

Improved training throughput and researcher productivity by eliminating full restarts on hardware failure through checkpoint recovery

Improved inference latency and reliability through optimized data pipelines and GPU-accelerated model execution

Enabled teams to deploy and iterate on AI features safely through reusable deployment and monitoring infrastructure

Mentored junior engineers and contributed to architecture decisions for distributed model training workflows

Built shared pipeline infrastructure that standardized reliability and monitoring practices across multiple model teams

Tech Stack

Backend

PythonDistributed SystemsREST APIsBackend Services

Infrastructure

TF Training ClustersGPU/TPU InfrastructureKubernetesPrometheusCanary Deployment

Data

TFRecordsGCS / ColossusData Preprocessing Pipelines

AI / ML

TensorFlowSpeech RecognitionComputer VisionRecommendation SystemsModel Training PipelinesML Infrastructure