A.I, Data and Software Engineering

Prevent colab from disconnecting with console js

P

This quick note is one solution (may not optimal) to prevent Colab from disconnecting during training your deep learning model.

disconnect Problem

Recently, my Google Colab notebook often gets disconnected after a while, and the data is lost. I searched and found a solution. So reshare this here.

SOLUTION

So to prevent this, we add a JS code to the console. Its purpose is to keep on clicking the page and prevent it from idling. So, I follow these steps:

  • Open the chrome console, Ctrl+ Shift + i to open inspector view
Chrome console
  • Goto console.
Get to the editable area
  • Paste and run the following code in the console:

And remember to press Enter to start the script, it then can prevent your Colab notebook from disconnecting.

1 comment

A.I, Data and Software Engineering

PetaMinds focuses on developing the coolest topics in data science, A.I, and programming, and make them so digestible for everyone to learn and create amazing applications in a short time.

Pin It on Pinterest

Newsletters

You have successfully subscribed to the newsletter

There was an error while trying to send your request. Please try again.

Petaminds will use the information you provide on this form to be in touch with you and to provide updates.
%d bloggers like this: