Reputation: 91
I have an agent which is trying to lear an upswing with an inverted pendulum on a cart. This takes ages on my Notebook. Then I found Google Colab. I thought this is my golden ticket for fast learning. But when I start my code and close my laptop it doesn't continue overnight. How can I change this? I read about the maximum time you have on the server, but I´m nowhere near this limit. Do I have to include some type of activation or am I just dumb?
Upvotes: 5
Views: 6721
Reputation: 2782
Run the following code in the console and it will prevent you from disconnecting.
Ctrl+ Shift + i
to open inspector view . Then go to console.
function ClickConnect(){
console.log("Working");
document.querySelector("colab-toolbar-button#connect").click()
}
setInterval(ClickConnect,60000)
Also, there are many methods described here. You can try with these methods.
Upvotes: 2
Reputation: 249
Well there are tons of different ways of doing this:
function ConnectButton(){
console.log("Connect pushed");
document.querySelector("#top-toolbar > colab-connect-button").shadowRoot.querySelector("#connect").click()
}
setInterval(ConnectButton,60000);
What this does is that clicks on the Connect button every 60 seconds of idleness and you should be good to go....BUT You can also click on runtime tab of colaboratory, click on change runtime type, and use Google's dedicated GPU or TPU as this will dramatically increase training process. Good luck!
Upvotes: 4