Member-only story
How to Systematically Debug Machine Learning Projects
As the world of machine learning evolves, tools like HuggingFace and the open-source LLMs movement have significantly simplified the training of machine learning models. However, a common misconception is that these models will work effortlessly in any scenario. Most tutorials showcase a ‘perfect scenario’ with standard datasets, leading to an oversimplified view of the process.
Let’s delve into the often-overlooked complexities of machine learning projects. In this blog, let’s talk about the things that are taken for granted thinking the scripts will just run and models will just converge..
Start Small
Always check if you can overfit the model with one training sample. Slowly increment the number of samples from 1, 10, to training size and see if the loss is converging. If that’s not happening anytime soon, there is a chance that either the pre-processing, the model or the post-processing modules are failing. This quick check helps you to answer two important questions: 1) Is the task too tough for the model to solve? or 2) Did I mess up something in the code/model/?
1) Is the task too tough to solve?
This is the time to create a dummy dataset or to choose an easy dataset. For instance, if your task is to solve classify animals in real world images, start with a proxy dataset like MNIST dataset. If the model loss still doesn’t converge and cannot overfit on the easy dataset, then…









