How to resume python machine learning after restart machine?

Viewed 111

I have some long machine learning modules I am doing on Python

using Anaconda Python and sklearn, and numpy libraries

These processes take days to finish.

and I am doing these processes on my laptop.

The problem is that I cannot keep my laptop on for days without turning it off

Is there a way I can preserve the Machine Learning processes before restarting then resume where stopped after restarting?

How to do that?

2 Answers

As @Mr. For Example stated this can easily be overcome with checkpoints, save checkpoints of your model, and later load the last checkpoint (or just any checkpoint you like) and continue your training process.

I don't know any way of stopping the process and then start it again in a few days.

Anyway, there is a free tool called Google Colab where you can execute your code there for up to 12 hours and you won't use your own resources but google servers. The downside to that is that they will keep your code (you will loose the intellectual property) but it executes faster and if you are not using it for business purposes it is perhaps a good alternative.

Related