Machine Learning Design Patterns

An occasional series of design patterns for ML Engineers

Lak Lakshmanan
1 min readSep 28, 2019

Note: This series has now become an O’Reilly book. You can read it in early release here on Safari or pre-order it on Amazon.

Book, due to be published Nov. 2020

You can also see the code for all the patterns on GitHub.

Original blogposts

Here are links to the blogposts that were expanded into the book (the book has 30 patterns):

  1. Transform: Moving an ML model to production is much easier if you keep inputs, features, and transforms separate
  2. Checkpoints: Saving the intermediate weights of your model during training provides resilience, generalization, and tuneability
  3. Virtual epochs: Base machine learning model training and evaluation on total number of examples, not on epochs or steps
  4. Keyed predictions: Export your model so that it passes through client keys
  5. Repeatable sampling: use the hash of a well distributed column to split your data into training, validation, and testing

--

--

Lak Lakshmanan

articles are personal observations and not investment advice.