Google colab is a tool offered by Google for free that allows the user to run code on a machine in the cloud.
I mainly use it to execute python scripts for daily tasks or have things running while I’m not able to have my computer on.
While this sounds like a great deal (it’s free), it has some limitations:
- After 90 minutes of inactivity from the user, the connection disconnects
- If the user doesn’t reconnect in a certain timeframe, the runtime shutdown
- There is a hard cut after 12 hours where the runtime gets shutdown, regardless of processes still running or the user still being connected
With these limitations in mind, it already scales down considerably what it can be used for. While the first limitation can be avoided with a little bit of scripting or an auto clicker, the 12 hours max runtime is a hard limitation.
For example, one of my usages of this is having AI prompting done at scale since the execution time is easily around 6 to 8 hours and having it done on a cloud machine avoids a plethora of errors such as crashing the program because I switched to the VPN and the connection got lost…
Therefore, depending on the usage rate of the APIs you are requesting, bigger batches might take longer than 12 hours. It is therefore important to slice the dataset accordingly.
But let’s get back to a more general overview of Google colab ; especially since I already mentioned the downside, let’s look at the advantages:
- Since the process is running in the cloud, no need to make sure that your computer is running all the time
- The code block editor makes it easy to have a data output or an insight after certain steps which in return also assure the fact that if the program is failing, some data was saved along the way
- It’s really cheap for the power and possibilities it has