How is Google Cloud ML awful this week?
March 16, 2017 — March 16, 2017
Yak shaving risk.
probably outdated
tl;dr Google Cloud ML is probably excellent if you design your algorithm from the ground up for it, but if you have something that runs perfectly well on your laptop and you wrote it to use, e.g. local files, or modern versions of Python, or custom compiled code, then you are going to need to substantially rewrite. NB this all is outdated now.
I want to do cloud machine learning using Google’s CloudML offering.
The goal: Working through getting and analysing the magnatagatune dataset in Google Cloud on my macOS laptop using TensorFlow.
I will follow approximately the least-nervy HOWTO, which sadly conveniently sidesteps many of my difficulties by having the input data be magically good.
There are too many ways to get the damn thing going.
There is much documentation for all these things, but it’s often unclear from page to page what the hell is happening, since it’s not clear whether you are spinning up VMs locally or in Google’s cloud.
One way is the purely cloud-based cloud shell
, but this is clearly too fragile and restrictive for real usage unless you are in Mountain View.
Offline there is a Docker-based thing, called cloud datalab
, which AFAICT is a somewhat monolithic machine image that approximates the online APIs or something. Here is a surly Google help page which implies as much.
Or you can install a bunch of Python packages from the command line.
Anyway, the terminology page is the clearest explanation of all terms before they get washed out in a combinatorial explosion. Lin Yi-Jhen does the best disambiguation, though.
Do I need this datalab nonsense? I can’t tell. I just want to run TensorFlow. Idea: proceed installing stuff randomly until eventually I have finished a deep-learning-based paper.
1 Command line
2 Cloud datalab thingy
First you must install Docker.
Or must I? I’m so awash right here.
Then do all the actual work.
Then
3 Getting data into cloud datastore
Complicated and tiresome. Not in the sense that it is too complicated if I really am fitting a million-parameter regression, but too complicated in the sense that I am just one grad student doing a side project. I don’t have 2 weeks of coding time to fit their data ingestion workflow.
It’s not a bad workflow as such, I suppose, it’s just massive overhead for my small project.
4 Now, port my Python 3 code to Python 2
This is an aspirational section; I won’t actually get here.
4.1 Oh sod it, just give me a normal virtual machine
ARGH their TensorFlow nonsense is melting my brain. I just want to use the sweet prototype on my laptop but go slightly faster.
Maybe I can rent a machine?
That IS supported, after all. OK, but how do I get GPUs in it? GPU.
Oh wait! I don’t get GPUs, so my entire motivation for using this Google stuff (I had some free credits) is hereby obliterated.
Sod this, I’m going to rent myself a big-ass GPU from Amazon and get this finished.