How Google has crushed it with Colaboratory

Sarah Quinn
Kainos Applied Innovation
5 min readJul 23, 2018

“It’s a Jupyter Notebook environment that requires no setup to use and runs entirely in the cloud.”

Google have released Colaboratory: a web IDE for python, to enable Machine Learning with storage on the cloud — this internal tool had a pretty quiet public release in late 2017, and is set to make a huge difference in the world of machine learning, artificial intelligence and data science work.

I’m pretty hyped about a web IDE that specifically lends itself to machine learning work — especially since Google has been keeping the tool to itself for years! So, I’ve spent some time looking into Colaboratory and examining whether or not it’s the next evolution of Jupyter Notebook.

Google first started working with the Jupyter Development Team in 2014 to release an early version of the tool, , since then the tool has been constantly evolving. For those of you who are familiar with Jupyter Notebooks — you’ll probably recognise Colaboratory as being almost identical in structure. That’s because it almost is. Google says: “It’s a Jupyter notebook environment that requires no setup to use and runs entirely in the cloud.”

As you’ve probably noticed — this cloud platform is Google Drive, which lets you use Jupyter Notebooks without having to download or install anything on your machine — meaning you can get started with Colaboratory instantly.

Of course, I should mention that quite a few other web IDEs exist that are similar to Colaboratory, Microsoft’s Azure Notebooks for example — but the recent public release, and promise of free GPU access made Google’s tool worthy of it’s own review in my opinion.

Getting Started

You can use this web IDE with an existing Google account, simply search for ‘Google Colaboratory’ and add the app to your Google Drive Apps, then make a new document in your drive and select ‘Colaboratory’; as with other Google Docs, you’ll be able to share the notebook and work on it collaboratively — the namesake of this tool.

I would highly recommend following this tutorial by Fuat from Deep Learning Turkey, if you’d like to try out the new web IDE for yourself.

Photo by Marvin Meyer on Unsplash

After a few weeks of using the tool casually, and following a few tutorials — here are my personal findings:

Benefits?

  • Free virtual machines for you to use: with about 12GB RAM and 50GB hard drive space, with common dependencies such as numpy, pandas, and even TensorFlow pre-installed.
  • Free GPU access
  • Supports Python 2 ( and just recently also Python 3! )
  • There is integration with Google Drive, you can share and control permissions and you’ll be able to see other collaborators work instantly.
  • There is a revisions history — an extremely useful feature for teams.
  • You can add comments on cells — someone for example could be given ‘comment-only’ permissions to review code. You can also resolve, reply and target comments to others.
  • You can import an existing Jupyter/IPython notebooks.
  • It also supports connecting to a Jupyter runtime on your local machine.

Drawbacks?

  • All Colaboratory notebooks must be stored in Google Drive — so you’ll need to log into a Google account before you can access the tool.
  • Long-running background computations may be stopped — “We encourage users who wish to run continuous or long-running computations through Colaboratory’s UI to use a local runtime”
  • You’ll need to install all specific libraries which do not come with standard python (and you’ll need to repeat this with every session).
  • Google Storage is used with your current session, so if you have downloaded a file and want to use it later, you’d better save it before closing the session.
  • It can be difficult (and potentially costly) to work with bigger datasets as you have to download and store them in Google drive (only 15GB is free in Google Drive).

GPU Access

One main benefit is the free GPU access as I mentioned earlier — I’ll go into a bit more detail:

  • Google’s new tool promises access to GPU resources directly.
  • You can run your code for 24 hrs without interruptions but not more than that, 12 hours if you connect to a GPU-based VM runtime. It is designed to be interactive. Google states: “Long-running background computations, particularly on GPUs, may be stopped.”
GPU Access on Google Colaboratory
  • It‘s very simple to alter default hardware (CPU to GPU or vice versa); just follow Edit > Notebook settings or Runtime>Change runtime type and select GPU as Hardware accelerator.
  • It’s FREE! A major selling point that really sets Colaboratory apart from similar tools.

There were other small features which I feel are worth a quick shoutout — the built in ‘SEARCH STACK OVERFLOW’ button that appears whenever an error occurs (a real life-saver), the spinners that appear when code is running, and the profile icons that appear for other editors, just like in Google docs.

Overall I found Colaboratory to be a great tool for Python development — I personally like the ‘Google-ey’ aesthetics and found it really intuitive to use. I’d say Google has absolutely crushed it. That said — it does have some drawbacks, like the reliance on Google Drive, however I personally embraced the cloud based platform and found that storing and sharing notebooks was made that bit easier with drive integration.

My Conclusion

Google Colaboratory is set to be a great tool in the future of machine learning work — but it’s also a great tool for anyone working with Python who’d like to use a cloud-based IDE and have free access to GPUs. Give it a try — I don’t think you’ll be disappointed!

--

--