Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to keeping Jupyter notebook awake and running even when PC goes to sleep

How do I keep my ML code running in the background in Anaconda Jupyter notebook even if my PC goes to sleep? Is there a way? Note: I do not want to change my sleep settings to sleep never.

like image 210
Uma Sankar Avatar asked Mar 05 '23 23:03

Uma Sankar


1 Answers

I do not think that is possible! The training should be suspended when the machine is in sleep. It will resume the calculations seamlessly right after the machine awakes.

While this is the generic behavior and you do not like it, other options can be thought of depending on how are you running the Jupyter notebook, in local? Then which operating systems? behavior in mac os is different from ubuntu when sleep. In mac you can use caffeinate python ... to keep the machine from sleeping till this script runs.

Another thing is, is it possible to just do just "display sleep" in mac os. Then the background process keeps running. Hope it helps.

like image 85
Haramoz Avatar answered Apr 08 '23 14:04

Haramoz