How is ๐๐/๐๐ ๐ฝ๐ฟ๐ผ๐ฐ๐ฒ๐๐ ๐ฑ๐ถ๐ณ๐ณ๐ฒ๐ฟ๐ฒ๐ป๐ ๐ณ๐ผ๐ฟ ๐ ๐ฎ๐ฐ๐ต๐ถ๐ป๐ฒ ๐๐ฒ๐ฎ๐ฟ๐ป๐ถ๐ป๐ด ๐ฃ๐ฟ๐ผ๐ท๐ฒ๐ฐ๐๐ compared to ๐ฅ๐ฒ๐ด๐๐น๐ฎ๐ฟ ๐๐ผ๐ณ๐๐๐ฎ๐ฟ๐ฒ?
The important difference that the Machine Learning aspect of the projects brings to the CI/CD process is the treatment of the Machine Learning Training pipeline as a first class citizen of the software world.
โก๏ธ CI/CD pipeline is a separate entity from Machine Learning Training pipeline. There are frameworks and tools that provide capabilities specific to Machine Learning pipelining needs (e.g. KubeFlow Pipelines, Sagemaker Pipelines etc.).
โก๏ธ ML Training pipeline is an artifact produced by Machine Learning project and should be treated in the CI/CD pipelines as such.
What does it mean? Letโs take a closer look:
Regular CI/CD pipelines will usually be composed of at-least three main steps. These are:
๐ฆ๐๐ฒ๐ฝ ๐ญ: Unit Tests - you test your code so that the functions and methods produce desired results for a set of predefined inputs.
๐ฆ๐๐ฒ๐ฝ ๐ฎ: Integration Tests - you test specific pieces of the code for ability to integrate with systems outside the boundaries of your code (e.g. databases) and between the pieces of the code itself.
๐ฆ๐๐ฒ๐ฝ ๐ฏ: Delivery - you deliver the produced artifact to a pre-prod or prod environment depending on which stage of GitFlow you are in.
What does it look like when ML Training pipelines are involved?
๐ฆ๐๐ฒ๐ฝ ๐ญ: Unit Tests - in mature MLOps setup the steps in ML Training pipeline should be contained in their own environments and Unit Testable separately as these are just pieces of code composed of methods and functions.
๐ฆ๐๐ฒ๐ฝ ๐ฎ: Integration Tests - you test if ML Training pipeline can successfully integrate with outside systems, this includes connecting to a Feature Store and extracting data from it, ability to hand over the ML Model artifact to the Model Registry, ability to log metadata to ML Metadata Store etc. This CI/CD step also includes testing the integration between each of the Machine Learning Training pipeline steps, e.g. does it succeed in passing validation data from training step to evaluation step.
๐ฆ๐๐ฒ๐ฝ ๐ฏ: Delivery - the pipeline is delivered to a pre-prod or prod environment depending on which stage of GitFlow you are in. If it is a production environment, the pipeline is ready to be used for Continuous Training. You can trigger the training or retraining of your ML Model ad-hoc, periodically or if the deployed model starts showing signs of Feature/Concept Drift.
Post #351
902
- ๐ 3