Testing of ML pipelines
Testing of ML pipelines is done at multiple levels, starting with unit tests and moving up toward integration (component) tests and then to system and acceptance tests. In these tests, two elements are important – the model itself and the data (for the model and the oracle).
Although we can use the unit test framework included in Python, I strongly recommend using the Pytest framework instead, due to its simplicity and flexibility. We can install this framework by simply using this command:
>> pip install pytest
That will download and install the required packages.
Best practice #62
Use a professional testing framework such as Pytest.
Using a professional framework provides us with the compatibility required by MLOps principles. We can share our models, data, source code, and all other elements without the need for cumbersome setup and installation of the frameworks themselves. For Python, I recommend using the Pytest framework...