Originally published on my blog here
I've had the opportunity of using both Google CoLab and Azure Notebooks while working on my project last semester, and I think I can safely say both of them are awesome to use. Google CoLab was seeded in 2014 and has grown ever since. Azure Notebooks is still in "Preview" mode but it is great to use even at this stage.
Let's compare the two environments based on the following parameters:
Full points to Azure Notebooks here, it feels exactly like running a a Jupyter Notebook locally. Google CoLab on the other is not as responsive.
Both services otherwise are pretty much same on functionality with code and markdown cells.
Azure NB has native Jupyter UI where as Google has "materialized" it. It's more about personal preference :p
Winner: Azure NB
I think this is a big difference between Google CoLab and Azure Notebooks. Google CoLab has a healthy memory limit of 20GB (the last time I tried, I think it didn't throw an error upto 20GB). Azure Notebooks on the other hand has a 4GB memory limit. This is a deal breaker for someone working with large datasets.
Here's where things get interesting, Google offers 12 hours of free usage of a GPU as a backend. The GPU being used currently is an NVIDIA Tesla K80. And it's more or less free forever because you can just connect to another VM to gain 12 more hours of free access. That's an enormous boost in performance for someone training a deep learning model.
Winner: Google CoLab
This is also an interesting aspect. File I/O is essential when you're dealing with datasets and CSVs and what not.
Google is yet to perfect the way CoLab handles files. There are a couple of ways of adding files like using Google Drive, uploading directly to CoLab Storage, accessing a sheet from Google Sheets, using Google Cloud Storage. The whole list can be found here. It's just that you need a lot of boilerplate code for all of the above methods except the first one. On top of that, uploading files for using in the notebook (which seems the most natural), has to be done everytime the notebook disconnects from the VM. Similarly, files downloaded using
wget (notebooks can be made to run bash commands by prefixing a
! against the command, didn't know that :p) last only as long as you're connected to the VM. Considering datasets can be huge, this isn't really a sustainable solution (Though this post is meant for beginners, so significant chance that they're not using massive datasets).
Azure Notebooks solves this problem by creating Libraries, which they've defined as being a collection of notebooks that are related. Libraries can also hold your data, assuming that each data file is less than 100 MB. I've used this before successfully with CSV, JSON and image files. Of course there are more ways to retrieve data in Azure Notebooks listed here. This is much more convenient if you are working with small datasets, essential for beginners. This I believe gives a more native feel of organising work into folders or workspaces as one does locally.
Winner: Azure NB
Some other features that I've noticed:
- Azure Notebooks support not just Python, but also F# and R languages.
- Did I mention Google offers free GPU compute using a Tesla K80 GPU :p ?
- Both CoLab and Azure Notebooks have cloud sharing functionality. CoLab is backed by Google Drive whereas Azure NB has it's Git-ish version of sharing through cloning.
- You can specify shell scripts that run to setup your environment, or even specify config in YAML files. And then you're given an integrated bash terminal. I mean, so much for customization :p. Though both the services support installing of Python modules using pip directly in the notebook.
So in conclusion, I think it comes down to each aspect. If you want to do intensive computation, go for Google CoLab but if you're looking for a simple cloud hosted notebook where you can mess around with classifiers, or linear regression or rudimentary neural networks, then go for Azure NB.
That's it for this one, let me know if I've got something wrong above or there are some new features that I haven't mentioned here!