title: No such file or directory Error with Google Cloud Storage
body: <p>I quite new to Google Cloud Platform and I am trying to train a model with TPU. I follow this <a href="https://hackernoon.com/nlp-tutorial-creating-question-answering-system-using-bert-squad-on-colab-tpu-1utp3352" rel="nofollow noreferrer">tutorial</a> to set up the TPU with Google Colab. All the code below follows the tutorial.</p>
  <p>This is the step I have done:</p>
  <pre><code>import datetime
  import json
  import os
  import pprint
  import random
  import string
  import sys
  import tensorflow as tf
  
  assert 'COLAB_TPU_ADDR' in os.environ, 'ERROR: Not connected to a TPU runtime; please see the first cell in this notebook for instructions!'
  TPU_ADDRESS = 'grpc://' + os.environ['COLAB_TPU_ADDR']
  print('TPU address is =&gt; ', TPU_ADDRESS)
  
  from google.colab import auth
  auth.authenticate_user()
  with tf.Session(TPU_ADDRESS) as session:
    print('TPU devices:')
    pprint.pprint(session.list_devices())
  
    # Upload credentials to TPU.
    with open('/content/adc.json', 'r') as f:
      auth_info = json.load(f)
    tf.contrib.cloud.configure_gcs(session, credentials=auth_info)
    # Now credentials are set for all future sessions on this TPU.
  </code></pre>
  <p>Output:</p>
  <pre><code>TPU address is =&gt;  grpc://10.4.89.154:8470
  </code></pre>
  <p>Provide my <code>BUCKET</code> name and <code>OUPUT DIRECTORY</code> name:</p>
  <pre><code>BUCKET = 'my_xlnet' #@param {type:&quot;string&quot;}
  assert BUCKET, '*** Must specify an existing GCS bucket name ***'
  output_dir_name = 'xlnet_output' #@param {type:&quot;string&quot;}
  BUCKET_NAME = 'gs://{}'.format(BUCKET)
  OUTPUT_DIR = 'gs://{}/{}'.format(BUCKET,output_dir_name)
  tf.gfile.MakeDirs(OUTPUT_DIR)
  print('***** Model output directory: {} *****'.format(OUTPUT_DIR))
  </code></pre>
  <p>Move the pretrained model to GCS bucket:</p>
  <pre><code>!gsutil mv /content/xlnet_extension_tf/model/xlnet_cased_L-24_H-1024_A-16 $BUCKET_NAME
  </code></pre>
  <p>Output:</p>
  <pre><code>...
  Operation completed over 5 objects/1.3 GiB.   
  </code></pre>
  <p>Then run the main code:</p>
  <pre><code>!python /content/xlnet_extension_tf/run_coqa.py \
  --use_tpu=True \
  --tpu_name=grpc://10.4.89.154:8470 \
  --spiece_model_file=$BUCKET_NAME/xlnet_cased_L-24_H-1024_A-16/spiece.model \
  --model_config_path=$BUCKET_NAME/xlnet_cased_L-24_H-1024_A-16/xlnet_config.json \
  --init_checkpoint=$BUCKET_NAME/xlnet_cased_L-24_H-1024_A-16/xlnet_model.ckpt \
  ...
  </code></pre>
  <p>Then I got this error:</p>
  <pre><code>OSError: Not found: &quot;gs://my_xlnet/xlnet_cased_L-24_H-1024_A-16/spiece.model&quot;: No such file or directory Error #2
  </code></pre>
  <p>This is the GCS bucket screen:
  <a href="https://i.stack.imgur.com/GGQRW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GGQRW.png" alt="enter image description here" /></a></p>
  <p>I don't know why this error exists because I can move my pretrained model to the bucket successfully.</p>
  <p>Do you guys know how to fix this?</p>
  <p><strong>Update:</strong></p>
  <p>The <code>run_coqa.py</code> file: <a href="https://github.com/stevezheng23/xlnet_extension_tf/blob/master/run_coqa.py" rel="nofollow noreferrer">https://github.com/stevezheng23/xlnet_extension_tf/blob/master/run_coqa.py</a></p>