How can I temporarily run a resource intensive process without overheating my CPU? I have a 2015 Macbook Pro with 2.5 GHz, 16GB.

I'm trying to run someone's deep learning python script on my macbook. The program has to take in training data and process it. It maxes out my CPU. I ran the fans on max speed and it got part way through the process but because my CPU cores were hitting 90 degrees I had to quit the script early.
make sure you have smc installed so you can adjust your fans...also, make sure your fans are clear of dust/debris...dust can create a real problem. you can also do new thermal paste but it may void your warranty...and thats only really necessary if youve got a constant, major overheating issue