Test-Driven Development in MLOps Part 1

Opeyemi Bamigbade
MLOps.community
Published in
7 min readDec 20, 2020

--

An approach to Test-Driven Development for ML-Powered Apps

Test-Driven Development (TDD) is a development technique where you must first write a test that fails before you write new functional code. This has found its usefulness mostly in traditional software development using the Agile approach for the development of application source code and is even being adopted by Agile DBAs for database development.

The process involves three simple steps that are repeated until a project is completed. These steps are:

  • Write a test for the functionality you want to add.
  • Write the functional code until the test passes.
  • Refactor all code to make it well structured.

Adopting TDD in MLOps can be tricky and stressful due to the iterative processes involve, the huge dependence on data and the workflow. TDD cannot be restricted to ensuring good functional source codes only but rather a way to also ensure reproducibility in MLOps. The Machine Learning Test Pyramid. ML requires more testing than traditional software engineering

source: mlinproductio.com

--

--