Book TOC · Chapter 0 of 7 · Next: Chapter 1

Chapter 0: The PMLE Reference Stack & 10 Core Principles

Chapter Focus: A visual guide to the Google Cloud Certified Professional Machine Learning Engineer (PMLE) architecture stack, how the core Google Cloud services fit together, and the 10 Core Architectural Principles that govern production design decisions.

1. The Master Architectural Map: All In-Scope Services of the Architecture Stack

[!IMPORTANT] Navigating Google Cloud ML Platform Terminology (Gemini Enterprise Agent Platform vs. Vertex AI): The June 1, 2026 PMLE Curriculum updates several managed ML platform references to Gemini Enterprise Agent Platform (e.g., Agent Platform AutoML, Agent Platform Workbench, Experiments on Agent Platform, Agent Platform Pipelines, Agent Platform Feature Store, Agent Platform Model Registry, Agent Platform Inference, Model Monitoring on Agent Platform, Ray on Agent Platform), while many production APIs, SDK classes (google-cloud-aiplatform), and production scenarios also reference their classic Vertex AI names. Throughout this book, we teach both naming conventions side-by-side so you recognize every service instantly regardless of how a question phrases it.

1. Low-Code AI, Foundation Models & Prebuilt APIs (Section 1 - ~13%) BigQuery ML (ARIMA_PLUS, XGBoost, KMEANS, TRANSFORM, ML.PREDICT, Gemini SQL Tuning) Agent Platform AutoML (Tabular, Forecasting, Vision, Text, Video) Model Garden & Foundation Models (Gemini, Imagen, Veo, Open-Weight MaaS, Context Caching) Prebuilt Industry AI APIs (Document AI, Vision API, Translation API, Speech-to-Text, Retail API) 2. Data Engineering, Feature Store, Notebooks & Experiments (Section 2 - ~16%) Data Exploration & Preprocessing (BigQuery, Dataflow / Apache Beam, Dataproc Spark, TFX / tf.Transform) Agent Platform Feature Store (Offline Store in BigQuery + Online Low-Latency Store, Point-in-Time Joins) Sensitive Data Protection (Cloud DLP) & Healthcare DICOM De-ID & Policy Tags Agent Platform Workbench & Colab Enterprise (Private IP, Single-User IAM, Spark Kernels, Git Integration) Experiments on Agent Platform & ML Metadata + Gen AI Evaluation (LLM-as-a-Judge / AutoSxS, ROUGE/BLEU) 3. Custom Training, Distributed Hardware & Model Tuning (Section 3 - ~21%) Training Data Organization (Cloud Storage TFRecords, BigQuery Storage Read API, WebDataset) Custom Training & SDKs (Prebuilt/Custom Containers, Tabular Workflows, Kubeflow on GKE, Ray) Hyperparameter Tuning (Vizier) (Bayesian Optimization, Log Scaling, Median Early Stopping) Foundation Model Fine-Tuning (Supervised Tuning, PEFT / LoRA / QLoRA, RLHF) Accelerators & Distributed Strategies (CPU, GPU, TPU v4/v5p, Data vs. Model Parallelism, Reduction Server) 4. Model Serving, Registry & Online Scaling (Section 4 - ~20%) Agent Platform Model Registry (Versioning, Aliases, Lineage to Deployment) Batch & Online Serving Runtimes (Agent Platform Inference/Endpoints, Batch Prediction, Cloud Run, GKE) Serving Containers & Preprocessing (Prebuilt Containers, Custom Containers, Custom Prediction Routines [CPR]) Safe Rollout & Scaling (Traffic Splitting, Canary, A/B, Private Endpoints/PSC, Quantization, TensorRT) 5. End-to-End MLOps Pipelines & CI/CD/CT (Section 5 - ~18%) Orchestration Engines (Agent Platform Pipelines / KFP, Managed Airflow / Cloud Composer, Ray) Data & Model Validation (TFDV Schema/Anomaly Checks, TFMA Evaluator + Resolver, InfraValidator) Automated Retraining & CI/CD/CT (Cloud Build, Cloud Deploy, Eventarc, Pub/Sub, Cloud Scheduler) 6. AI Security, Responsible AI, Explainability & Monitoring (Section 6 - ~13%) AI Security & Guardrails (Model Armor, Safety Filters, Regex, VPC Service Controls) Explainable AI & Responsible AI (Sampled Shapley, Integrated Gradients, XRAI, Fairness / TFMA, Model Cards) Model Monitoring on Agent Platform (Training-Serving Skew, Data Drift, Concept Drift, Attribution Drift)

Complete Reference Table of In-Scope Google Cloud ML Services & Tools

Architectural Plane
Official Service / Tool Name
Primary Architectural Responsibility & Selection Trigger
1. Low-Code AI & Prebuilt APIs
BigQuery ML (BQML)
Train and serve ML models (LINEAR_REG, LOGISTIC_REG, BOOSTED_TREE_*, ARIMA_PLUS, KMEANS, MATRIX_FACTORIZATION, AUTOENCODER) and invoke/fine-tune Gemini directly on data already in BigQuery using SQL (CREATE MODEL, TRANSFORM, ML.PREDICT, ML.GENERATE_TEXT).
1. Low-Code AI & Prebuilt APIs
Agent Platform AutoML (Vertex AI AutoML)
No-code/low-code training of high-accuracy custom models on Tabular, Forecasting (L2 / Quantile loss), Image, Text, and Video data when custom labels are needed without writing neural network code.
1. Low-Code AI & Prebuilt APIs
Agent Platform Model Garden
Discover, evaluate, customize, and deploy Google foundation models (Gemini, Imagen, Veo) and open-weight models (Gemma, Llama, Mistral) via Models as a Service (MaaS) or self-managed endpoints.
1. Low-Code AI & Prebuilt APIs
Industry-Specific & Prebuilt AI APIs
Zero-training APIs for standard tasks: Document AI (Invoice/Form/Splitter processors), Cloud Vision API (OCR, pre-trained objects/logos), Cloud Translation API, Speech-to-Text / Text-to-Speech, and Vertex AI Search for Retail.
2. Data, Feature Store & Notebooks
BigQuery, Dataflow & Dataproc (Apache Spark)
BigQuery for SQL exploration/elt; Dataflow (Apache Beam) for unified batch + streaming windowing/watermarking pipelines and tf.Transform; Dataproc for distributed PySpark/Spark MLlib workloads.
2. Data, Feature Store & Notebooks
Agent Platform Feature Store (Vertex AI Feature Store)
Dual-tier repository (BigQuery offline store + Bigtable/Optimized online store) that serves identical features for training and low-latency online inference while preventing time-travel data leakage via point-in-time joins (read_instances).
2. Data, Feature Store & Notebooks
Sensitive Data Protection (Cloud DLP)
Automated inspection, classification, masking, cryptographic tokenization (FPE/deterministic), and DICOM medical image de-identification for PII/PHI before training or LLM ingestion.
2. Data, Feature Store & Notebooks
Agent Platform Workbench & Colab Enterprise
Colab Enterprise for zero-setup serverless notebooks with real-time cursor collaboration and BigQuery Studio integration; Workbench Instances for customizable VMs, custom containers, private IP/VPC-SC networking, and Spark kernels.
2. Data, Feature Store & Notebooks
Experiments on Agent Platform & ML Metadata
Experiments for logging/comparing parameters, metrics, and Parallel Coordinates plots across runs; TensorBoard for loss curves and GPU/TPU profiling; ML Metadata for automated artifact lineage graphs (Dataset → Model → Endpoint).
3. Custom Training & Hardware
Agent Platform Custom Training & Tabular Workflows
Custom Training runs PyTorch/TensorFlow/XGBoost/JAX jobs via prebuilt or custom Docker containers; Tabular Workflows offers glass-box modular AutoML pipelines; Kubeflow on GKE supports hybrid/on-prem Kubernetes portability.
3. Custom Training & Hardware
Hyperparameter Tuning (Vertex AI Vizier)
Automated hyperparameter search using Bayesian optimization (default), Grid, or Random search, UNIT_LOG_SCALE for multi-order ranges, and Median Automated Early Stopping to terminate unpromising trials.
3. Custom Training & Hardware
Foundation Model Tuning (SFT, PEFT/LoRA, RLHF)
Supervised Fine-Tuning (SFT) and Parameter-Efficient Fine-Tuning (PEFT / LoRA / QLoRA) to adapt foundation model style/domain behavior and shrink bulky few-shot prompts; RLHF to align tone with human preferences.
3. Custom Training & Hardware
CPU, GPU, TPU & Distributed Training
CPUs for fast/cheap Scikit-learn/XGBoost; GPUs for PyTorch/custom CUDA/FP64; TPUs (BF16, Pod slices, TPU VMs) for massive matrix-heavy Transformers/CNNs. Data Parallelism (MirroredStrategy, MultiWorkerMirroredStrategy, TPUStrategy, DDP, Reduction Server) vs. Model Parallelism (FSDP, DeepSpeed ZeRO, ParameterServerStrategy).
4. Serving, Registry & Scaling
Agent Platform Model Registry
Central catalog for organizing models, tracking versions (v1, v2), assigning version aliases (champion, challenger), and governing deployment rollouts.
4. Serving, Registry & Scaling
Batch & Online Inference Services
Agent Platform Inference (Endpoints) for low-latency synchronous REST/gRPC online serving; Batch Prediction for high-throughput asynchronous scoring from BigQuery/GCS; Cloud Run for scale-to-zero lightweight containers; GKE (vLLM, TGI) for high-control multi-host GPU/TPU serving.
4. Serving, Registry & Scaling
Containers & Custom Prediction Routines (CPR)
Prebuilt Containers (model.joblib, model.bst, SavedModel, TorchScript .mar); Custom Prediction Routines (CPR) to inject Python pre/post-processing without building a web server from scratch; Custom Containers (AIP_HTTP_PORT, AIP_HEALTH_ROUTE, AIP_PREDICT_ROUTE) for C++ dependencies.
4. Serving, Registry & Scaling
Private Endpoints, Autoscaling & Optimization
Private Endpoints (VPC Peering / Private Service Connect [PSC]) for RFC 1918 isolation; proactive min_replica_count scaling before flash sales; GPU Duty Cycle scaling metric; Quantization (FP32 → INT8), Pruning, Knowledge Distillation, and TensorRT (TF-TRT).
5. MLOps Pipelines & CI/CD/CT
Agent Platform Pipelines, Airflow & Ray
Agent Platform Pipelines (serverless KFP v2 / TFX execution with step caching); Managed Service for Apache Airflow (Cloud Composer) for cross-system multi-cloud ETL orchestration; Ray on Agent Platform for distributed Python/RL scaling.
5. MLOps Pipelines & CI/CD/CT
TFX Validation & Preprocessing Components
ExampleGen → StatisticsGen → SchemaGen → ExampleValidator (TFDV anomalies) → Transform (hermetic tf.Transform graph preventing training-serving skew) → Trainer → Evaluator (TFMA slice validation vs. Resolver baseline) → InfraValidator → Pusher.
5. MLOps Pipelines & CI/CD/CT
Continuous Training (CT) & CI/CD Automation
Cloud Build for Git-triggered CI (unit tests, KFP YAML compilation, container builds to Artifact Registry); Cloud Scheduler for cron retraining; Eventarc / Pub/Sub + Cloud Run Functions for drift-triggered or GCS arrival-triggered Continuous Training.
6. Security, Explainability & Monitoring
Model Armor & Safety Filters
Model Armor inspects prompts, retrieved RAG chunks, and LLM outputs against prompt injection, jailbreaks, and data exfiltration; built-in Safety Filters block hate speech/harassment/dangerous content.
6. Security, Explainability & Monitoring
Explainable AI & Responsible AI
Sampled Shapley for non-differentiable trees/tabular (XGBoost); Integrated Gradients for differentiable neural nets (tabular/text); XRAI for image region attributions. TFMA / What-If Tool for subgroup fairness (Equal Opportunity, Demographic Parity) and Model Cards.
6. Security, Explainability & Monitoring
Model Monitoring on Agent Platform
Samples live endpoint requests to BigQuery to detect Training-Serving Skew (requires training dataset baseline), Data/Prediction Drift (compares sliding production windows when no baseline or delayed labels exist), and Feature Attribution Drift (detects concept drift via shifting Shapley importances).

2. The 10 Core Architectural Principles of the Architecture Stack

Before you tackle your first challenge in Chapter 1, internalize these 10 Core Architectural Principles. Whenever you are torn between two plausible-sounding options In production architectures, these laws eliminate 80% of look-alike service comparisons immediately:

  1. Principle 1 — Follow the Gravity of Data and Team Skill (BigQuery ML → AutoML → Custom Training):
  2. Data is tabular in BigQuery + team knows SQL + need fastest time-to-market → BigQuery ML (CREATE MODEL).
  3. Need high accuracy on Tabular/Image/Text/Video with custom labels + minimal ML coding → Agent Platform AutoML.
  4. Standard pre-trained perception task (generic OCR, receipt/invoice parsing, translation, speech) → Prebuilt AI APIs (Document AI, Vision API, Translation API).
  5. Custom neural architecture, specific loss function, or custom C++/hardware control → Agent Platform Custom Training.
  6. Principle 2 — Bake Preprocessing Into the Model Artifact to Eliminate Training-Serving Skew: Never rewrite Python training preprocessing logic in Java/Go for production serving. Use the TRANSFORM clause in BigQuery ML, tf.Transform (TFT) in TFX/Dataflow (which exports a hermetic preprocessing graph attached to the SavedModel), Keras preprocessing layers inside the model graph, or Agent Platform Feature Store to guarantee mathematical parity between training and online serving.
  7. Principle 3 — Respect the Laws of Time (Never Leak the Future Into the Past): On time-dependent, churn, or forecasting datasets, never use a random split—always use a chronological / manual time-based split. Drop retrospective "leaker" columns that are only populated after the target event occurs. When generating training datasets from Agent Platform Feature Store, always pass an entity_df with historical observation timestamps (read_instances) to execute a point-in-time join.
  8. Principle 4 — Match the Metric to the Class Distribution and Business Asymmetry: On highly imbalanced datasets (e.g., 0.1% fraud or rare defect detection), raw Accuracy and even ROC-AUC are deceptive traps because huge True Negative counts mask poor minority-class detection. Always optimize and evaluate with PR-AUC (AUC-PR). If missing a positive case (False Negative, e.g., medical diagnosis or safety defect) is catastrophic, lower the classification threshold to maximize Recall; if False Positives are costly (e.g., blocking legitimate VIP credit cards), raise the threshold to maximize Precision.
  9. Principle 5 — Cure the "Millions of Small Files" I/O Bottleneck with Contiguous Shards: When GPU/TPU utilization sits at 20–30% while reading millions of small JPEG/PNG/CSV files from Cloud Storage, adding more GPUs is a trap—you are bottlenecked on Cloud Storage HTTP metadata/open-file latency. Consolidate small files into 100–200 MB TFRecord (or WebDataset) shards via Dataflow, and chain .prefetch(tf.data.AUTOTUNE) and .interleave() in tf.data. When reading petabytes of tabular data from BigQuery into TensorFlow/PyTorch, stream directly via the BigQuery Storage Read API instead of exporting CSVs.
  10. Principle 6 — Match Hardware Accelerators to Precision and Framework Constraints:
  11. Scikit-learn / XGBoost on medium tabular data → CPU VMs (cost-effective; standard sklearn does not use GPUs/TPUs).
  12. Massive TensorFlow/JAX Transformers or CNNs using bfloat16 → Cloud TPUs (TPU VM architecture for direct SSH debugging; Pod slices for scale; Reduction Server for multi-node GPU all-reduce bandwidth).
  13. Custom C++ CUDA kernels, strict float64 (double precision) financial math, or heavy dynamic control flow → NVIDIA GPUs (never TPUs!).
  14. Principle 7 — Reactive Autoscaling Cannot Catch an Instant Flash Sale: Managed online endpoints take several minutes to provision new VMs, pull multi-gigabyte container images, and load model weights into VRAM. For a known, scheduled traffic spike (like a 12:00 PM Black Friday flash sale), always proactively increase min_replica_count ahead of the event. Furthermore, when autoscaling GPU endpoints, trigger scaling on GPU Duty Cycle / GPU Utilization rather than CPU utilization.
  15. Principle 8 — Choose the Simplest Serving Packaging (Prebuilt → CPR → Custom Container):
  16. Standard framework artifact (model.joblib, model.bst, SavedModel) → Prebuilt Container.
  17. Standard framework + custom Python pre/post-processing logic → Custom Prediction Routine (CPR).
  18. Non-standard framework, custom C++ system libraries (apt-get), or custom HTTP server (FastAPI listening on $AIP_HTTP_PORT) → Custom Container.
  19. Principle 9 — Match the Explainable AI Method to Model Differentiability and Modality:
  20. Non-differentiable models (XGBoost, Random Forests, Scikit-learn ensembles on tabular data) → Sampled Shapley.
  21. Differentiable neural networks (TensorFlow/PyTorch DNNs on tabular or text data) → Integrated Gradients.
  22. Computer vision / image models (highlighting superpixel regions on X-rays or photos) → XRAI.
  23. Principle 10 — Distinguish Training-Serving Skew from Drift and Layer AI Security:
  24. Compare live production inputs against the original training dataset baseline → Training-Serving Skew Detection.
  25. Compare recent production window $T_2$ against prior production window $T_1$ (no training baseline available) → Prediction / Data Drift Detection.
  26. Input feature distributions stay flat, but feature importance shifts over time (early warning of Concept Drift when ground-truth labels are delayed by months) → Feature Attribution Drift Monitoring.
  27. Protect LLM/GenAI apps against prompt injection & jailbreaks with Model Armor + Safety Filters, and redact PII/PHI with Sensitive Data Protection (SDP).

Book TOC · Chapter 0 of 7 · Next: Chapter 1

AwesomeGCP.com Learning

The approach taken is a question-led learning approach: you explore realistic project scenarios where you need to make decisions or take actions to achieve business goals within specific constraints. Instead of passive learning, you are challenged to think and work through the options to master the Professional Machine Learning Engineer (PMLE) certification!

Practice PMLE Questions