hunkim / word-rnn-tensorflow

Multi-layer Recurrent Neural Networks (LSTM, RNN) for word-level language models in Python using TensorFlow.
MIT License
1.3k stars 493 forks source link

Sxy master google cloud utils #25

Closed sunxiaobiu closed 8 years ago

sunxiaobiu commented 8 years ago

I have committed the code that using boto to upload/download file to/from google_cloud and I have tested it by running "python train.py" locally, it works~ btw,you need to prepare the environment first, some param like 'client_id'、'client_secret' in the local {HOME}/.boto file need to be setted:

client_id = 857458742632-lrt61p69cvb8bc4sa5lv3k8adterfc3t.apps.googleusercontent.com
client_secret = f58f6QWrjj1qqTZjIrFR5Fna

also, in the code , the params need to be settled if you want to use your own google cloud bucket:

self.data_dir = data_dir
        self.GOOGLE_STORAGE = 'gs'
        self.TENSORFLOW_BUCKET = 'rnn-tensorflow'
        self.CLIENT_ID = '857458742632-lrt61p69cvb8bc4sa5lv3k8adterfc3t.apps.googleusercontent.com'
        self.CLIENT_SECRET = 'f58f6QWrjj1qqTZjIrFR5Fna'
        self.project_id = 'crucial-raceway-148802'
sunxiaobiu commented 8 years ago

The test run failed because the lack of permission of my project for the google cloud platform. The program will work if you put your own register information in the code.

hunkim commented 8 years ago

@sunxiaobiu Never put password/secret. Just change the file IO part. No need to have auto-submit. Also at least it should be able to run it locally.