No. 181 of 500 No. 23 in Hands-On AI & Programming

Machine Learning Design Patterns

Solutions to Common Challenges in Data Preparation, Model Building, and MLOps

By Valliappa Lakshmanan, Sara Robinson and Michael Munn

Print length
405 pages
Publisher
O'Reilly Media
Reading level
Intermediate
ISBN-13
978-1098115784
Published
November 24, 2020
Written for
Data scientists and ML engineers moving models from notebooks into production systems.

Synopsis

Three engineers from Google Cloud distill lessons from production machine learning into thirty named patterns, in the spirit of classic software design patterns. The chapters move through data representation (hashed features, embeddings, feature crosses, multimodal input), problem representation (reframing, multilabel, ensembles, cascades, neutral classes, rebalancing), model training (useful overfitting, checkpoints, transfer learning, distribution strategy, hyperparameter tuning), resilient serving, reproducibility (the Transform pattern, repeatable sampling, workflow pipelines, feature stores, model versioning) and responsible AI (heuristic benchmarks, explainable predictions, a fairness lens). Each pattern states a problem, presents a solution, explains why it works and weighs trade-offs and alternatives.

Code examples use SQL, often for BigQuery, and Keras on TensorFlow, so the book leans toward the Google stack, though the reasoning carries to other platforms. Readers gain a shared vocabulary for design reviews and a checklist of failure modes, such as training-serving skew and silent model decay, that tend to surface only after deployment. The material predates large language models; lead author Valliappa Lakshmanan has since co-written Generative AI Design Patterns (2025) to cover that territory.

Scorecard

Editorial score

How it scored

Editorial score: 76.3 / 1005 weighted criteria

  • Influence30%

    22.5/30
  • Authority25%

    20.0/25
  • Practical value20%

    17.0/20
  • Currency15%

    9.8/15
  • Readability10%

    7.0/10
  • Editorial score

    76.3/100

How the rank was computed

Rank No. 181 of 500 comes from a composite of 57.4: observable signals 23.0 of 55 points plus editorial review 34.4 of 45 points.

All 11 inputs
InputPoints
Observable signals23.0/55
Reach (Amazon ratings volume)9.6/16.5
Consensus across best-of lists5.5/13.8
Awards and bestseller evidence0.0/8.3
Reader rating, sample-adjusted6.7/8.3
Amazon sales rank1.2/5.5
Recency0.0/2.8
Editorial review34.4/45
Author authority9.0/11.3
Influence10.1/13.5
Practical value7.7/9.0
Readability3.2/4.5
Currency4.4/6.8

Each criterion is scored from 1 to 10 and weighted, and the points add up to the editorial score. The rank combines observable signals (55 percent) with this score (45 percent). Read the methodology.

Verdict

A durable, well-organized catalog of thirty production ML patterns, best for practitioners who already train models and need to ship them.

Strengths

  • Consistent problem, solution and trade-off structure
  • Covers the full ML lifecycle
  • Companion repository with runnable notebooks

Keep in mind

Examples lean heavily on Google Cloud, BigQuery and TensorFlow, and the 2020 text does not address large language models or agents.

Key takeaways

  1. Reframing a problem, such as turning regression into classification or adding a neutral class, often improves results more than tuning a model does.
  2. The Transform pattern keeps preprocessing logic with the model so the same feature computations run in training and serving, preventing skew.
  3. Checkpoints, distribution strategies and hyperparameter tuning make training robust and repeatable at scale rather than a one-off notebook exercise.
  4. Continuous evaluation, feature stores and model versioning treat deployed models as living systems that need monitoring and controlled updates.

Notable facts

  • The book's companion code repository under Google Cloud Platform's GitHub organization has drawn about 2,100 stars and nearly 600 forks. Source (opens in a new tab)

About the author

Valliappa Lakshmanan, Sara Robinson and Michael Munn

Valliappa (Lak) Lakshmanan was Director of Data Analytics and AI Solutions at Google Cloud, where he co-founded the Advanced Solutions Lab, after serving as a research scientist at NOAA; he later co-founded the finance-focused AI startup Obin AI and has written several O'Reilly books. His co-authors were Sara Robinson, then a Google Cloud developer advocate, and Michael Munn, an ML solutions engineer at Google.

Questions

What is Machine Learning Design Patterns about?
The book catalogs thirty recurring solutions to problems in production machine learning, grouped into data representation, problem representation, training, resilient serving, reproducibility and responsible AI. Each pattern describes the problem, a solution, why it works and the trade-offs, with code in SQL and Keras. Its three authors wrote it while working at Google Cloud.
Is Machine Learning Design Patterns still relevant in 2026?
Largely, yes. Patterns such as reframing, checkpoints, feature stores, model versioning and continuous evaluation still apply to most predictive ML systems. The 2020 book does not cover large language models, agents or retrieval, however; lead author Valliappa Lakshmanan addresses those topics in Generative AI Design Patterns, co-written with Hannes Hapke and published by O'Reilly in 2025.
Do you need Google Cloud to use Machine Learning Design Patterns?
No. The examples use BigQuery SQL, TensorFlow and Keras, and some patterns reference Google Cloud services, but the underlying problems and solutions are platform-neutral. Teams working on AWS, Azure or open-source stacks can apply the same reasoning, though they will need to adapt the code samples to their own tools.

Sources

As an Amazon Associate, Best AI Books earns from qualifying purchases. Best AI Books is sponsored by Iternal.ai, whose founder and CEO, John Byron Hanby IV, wrote The AI Strategy Blueprint, our #1 ranked book. How we rank books.