liveBook · Manning

Smoke test

As explained in Machine Learning System Design

A preliminary test that checks whether a system or component operates sufficiently to warrant further testing.

A smoke test is a fast preliminary check that a system operates well enough to justify deeper testing. For an ML training pipeline, run it after changes on a small dataset, for few epochs, and possibly with a reduced model. The test should complete without errors and produce reasonable output, such as decreasing loss. section 10.5

Use smoke tests to:

  • Catch regression bugs early and increase iteration speed during experimentation and debugging. section 10.5
  • Check both that the pipeline runs and that its output is plausible, rather than proving every component correct. section 10.5
  • Pair a high-level pipeline smoke test with low-level unit tests for the most sensitive components. section 10.5
  • Treat maintenance as a tradeoff: significant pipeline changes can require corresponding smoke-test updates. section 10.5

Training-pipeline check

A test replaces a full ResNet with a dummy model, points training at a fixture dataset, limits training to one epoch, and asserts that training and validation loss remain below thresholds. It also verifies that the expected model constructor is called once.

The same idea appears at system level in a baseline: use the easiest workable alternative to check that components connect and produce the required format before investing in a sophisticated model. Unlike a disposable prototype, the baseline can remain as a comparison point and fallback response. section 8.1

How Machine Learning System Design covers it

How deep it goes
Defines a fast, reduced-scale pipeline check and its maintenance tradeoff, while deferring detailed component coverage to unit tests.
Examples
Uses a fixture dataset, one epoch, a dummy ResNet, mocked construction, and training and validation loss assertions.
What it assumes
Assumes a configurable pipeline and basic unit-test knowledge, while illustrating the test from a reduced training setup.
What you can do after
Diagnose/debug pipeline regressions quickly and decide whether deeper testing or experimentation is worthwhile.
How it connects
Connects integration testing, unit testing, regression bugs, baselines, experimentation, and debugging.

Also explained in

Compare how 4 books explain smoke test →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning System Design. The section links point to the parts of the book it draws on.