Eric Landau •January 3, 2023
4 Things to Do While Training Your Model
The time has come.
You’ve constructed and tweaked the parameters of your algorithm. You’ve selected and balanced your training data. You’ve taken into account the data quality as well as quantity.
You’re ready to train your model.
In other words, you’re ready to wait, and depending on the size of your dataset and your compute power, you might be waiting minutes, hours, or even days.
However, don’t think of that time as lost time. Think of it as a gift. Time to do some of those things you’ve been meaning to do but just haven’t yet gotten around to.
At a loss for ideas? Don’t worry. We’re here to help. Below are four things you can do while training your model.
Tackle Seasonal Cleaning
That’s right: get cleaning. Nearly everyone likes a tidy environment but no one actually wants to take the time to clean it. Well, now, you’ve got the time.
Start by cleaning up your file system. Get rid of those CSV files and move or delete all that random data stored quickly and haphazardly on your systems.
Now that you’ve got that out of the way, clean up your code. We know what ML engineers are like (after all, we are ML engineers): you wrote that code in a hurry and it isn’t as efficient as it could be. That analysis you just put through a Jupyter notebook? You and I both know it shouldn’t have seven layers of nested loops. No one likes to feel embarrassed about what’s on their GitHub. Now that the model is actually training, let’s get that code in shape so that it’s more efficient and easier for the next person to follow.
Once you’ve finished cleaning up your digital environments, it’s time to tackle your physical one. Take a look around. Those three-day old coffee mugs aren’t actually part of your office decor. Take them downstairs and give them a wash. We mean a proper scrub. You can’t just give them a quick rinse and expect the days-old coffee rings to come off the inside.
Grab those takeaway containers and throw them away while you’re at it. If the bin is already full, take the bag out rather than continuing to play the precarious game of trashcan Jenga. When that tower falls, nobody wins.
Take Care of Your Physical Health
Speaking of takeaway containers, now that your model is running, it’s time to take stock of your physical health.
First things first: How long has it been since you’ve had a shower? If you had to pause to think of the answer to that question, then go take a shower. We’ll be here when you get back
Next, let’s think about exercise. Go outside. Go on a run. Get some Vitamin D. Enjoy the fresh air.
If you're training a larger model and you’ve got some more time, why not hit the gym? If you don’t have much time until your model finishes training, then there’s lots of near-the-desk exercises you can learn to do: jumping jacks, windmills, squats, toe touches, etc.
Once you’ve got those exercise-induced endorphins kicking, you can turn your attention to your diet. Plan your meals for the week. Go get some groceries. Stop eating so much takeaway. (Doing this will also reduce the amount of time you need to spend cleaning your office in the future.)
If your model is going to take eight-plus hours to train, learn to cook a new dish. Maybe you can be the first one to actually master how to cook a 15-minute meal in 15 minutes.
We know that what you most want to do while your model is running is check the intermediate results. Do not give into that temptation.
Instead, practice self-discipline.
Strengthen your mind (and your dopamine channels) by resisting the urge for instant gratification. Actually, why not really attempt to strengthen your mind by using this time as an opportunity to dip your toe in the waters of meditation? An app like Headspace can get you started, or, if you want a more thorough introduction, check out a meditation guidebook.
If meditation doesn’t appeal to you, you can still practice self-restraint. Avoid checking those results and focus on broadening your horizons instead. Learn something new or try a new hobby. And I don’t mean day trading stocks or crypto. (In fact, that’s another example of what not to do while training your model.)
Take an art history class on Khan Academy. Get an edge on old age by learning to play bridge before you retire. Read Asimov. You’ve spent years trying to hide the fact that you haven’t actually read The Foundation series from your friends and colleagues: now’s a perfect time to actually read this influential sci-fi classic.
Call Your Mom
Call your mom. She hasn’t heard from you in a while, and she’s wondering how you are.
She’s also really proud of you. She tells all her friends that you work with computers, even if she doesn’t understand exactly what you do. You could use this opportunity to explain to her what an ML engineer does. Or if that’s too daunting a prospect, just fill her in on your life– especially your love life, news of your childhood friends, or updates about your kids. She loves all that stuff.
However, if it’s a quick training model you’ve got running, maybe call your dad instead.
February 1, 2023
12 min read
January 31, 2023
7 min read