Will Google Colab keep running cells for saving files in mounted drive if i disconnect?

2.5k views Asked by At

I am training a neural network but it is going to take time. If I shut down my laptop, will the network keep on training and save the model weights in drive.

1

There are 1 answers

1
Eloy Pérez Torres On BEST ANSWER

Short answer: Almost certainly not. It depends on how much time do you need to traing your neural network, less than 90 minutes is ok.

Long answer: (explanation)
From Google Colaboratory FAQ:

How long can notebooks run in Colab?
Notebooks run by connecting to virtual machines that have maximum lifetimes that can be as much as 12 hours. Notebooks will also disconnect from VMs when left idle for too long. Maximum VM lifetime and idle timeout behaviour may vary over time, or based on your usage. This is necessary for Colab to be able to offer computational resources for free.

Detailed info from Clouderizer's Colab FAQ:

Google Colab notebooks have an idle timeout of 90 minutes and absolute timeout of 12 hours. This means, if user does not interact with his Google Colab notebook for more than 90 minutes, its instance is automatically terminated. Also, maximum lifetime of a Colab instance is 12 hours.

To learn how to prevent Google Colab from disconnecting while complying with Google Colab's Terms of Use read this stackoverflow question.