9 Modularity for ML: Writing testable and legible code

This chapter covers

  • Demonstrating why monolithic script-coding patterns make ML projects more complex
  • Understanding the complexity of troubleshooting non-abstracted code
  • Applying basic abstraction to ML projects
  • Implementing testable designs in ML code bases

Precious few emotions are more soul-crushing than those forced upon you when you’re handed a complex code base that someone else wrote. Reading through a mountain of unintelligible code after being told that you are responsible for fixing, updating, and supporting it is demoralizing. The only worse situation when inheriting a fundamentally broken code base to maintain occurs when your name is the one on the commit history.

This isn’t ...

Get Machine Learning Engineering in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.