Google Storage (gs) wrapper file input/out for Cloud ML?
<p>Google recently announced the Clould ML, <a href="https://cloud.google.com/ml/" rel="noreferrer">https://cloud.google.com/ml/</a> and it's very useful. However, one limitation is that the input/out of a Tensorflow program should support gs://.</p>

<p>If we use all tensorflow APIS to read/write files, it should OK, since these APIs support <code>gs://</code>.</p>

<p>However, if we use native file IO APIs such as <code>open</code>, it does not work, because they don't understand <code>gs://</code></p>

<p>For example:</p>

<pre><code> with open(vocab_file, 'wb') as f:
        cPickle.dump(self.words, f)
</code></pre>

<p>This code won't work in Google Cloud ML.</p>

<p>However, modifying all native file IO APIs to tensorflow APIs or Google Storage Python APIs is really tedious. Is there any simple way to do this? Any wrappers to support google storage systems, <code>gs://</code> on top of the native file IO?</p>

<p>As suggested here <a href="https://stackoverflow.com/questions/40133223/pickled-scipy-sparse-matrix-as-input-data">Pickled scipy sparse matrix as input data?</a>, perhaps we can use <code>file_io.read_file_to_string('gs://...')</code>, but still this requrements significant code modifcation.</p>