CI/CD for Machine Learning

Image: Helmut Hauschild, HSEC
First published at Notes on Personal Data Science on 11 July 2020.
One of the tasks that people, who care about their own sanity, try to avoid, is the integration of a data science workflow into a software development workflow. It is a necessary evil on the way to a halfway intelligent system that does something useful. But it is usually a mess. That is: until now.
I have been playing around with CML and must admit, that I am quite impressed with the simplicity and elegance of the concept. CML is a brand new open source project by Iterative.ai, the people behind DVC, a Git based data version control system for machine learning, which by itself is a big step towards overview, reproducability and general sophistication in large or complex machine learning projects.
CML allows you to move the training pipeline from your snowflake environment into the same build system that your software developers are already using.

For the data scientist, nothing really changes. All you have to do, is adding a pipeline configuration file, like here for Gitlab:

The cml-py3 container (in this case) runs the training script. It can utilize your Cloud/GPU resources if necessary. If this goes well, the trained model is available in Gitlab for downstream builds, like that of an app which utilizes the model.
And that’s it. Clean, simple and so much easier than the manual plumbing of the artifacts of teams that hardly ever speak the same language.
As a nice side effect, the integration into a technically mature CI system let’s you take advantage of features like pipeline management, container registry, Kubernetes integration, issue tracking, etc., etc., etc., … — without any additional effort.

To sum things up: I don’t think that I will start any ML project without CML in the foreseeable future.