GoogleCloudPlatform / cloudml-samples

Cloud ML Engine repo. Please visit the new Vertex AI samples repo at https://github.com/GoogleCloudPlatform/vertex-ai-samples
https://cloud.google.com/ai-platform/docs/
Apache License 2.0
1.52k stars 857 forks source link

What version is required to run these examples? #56

Closed erichulburd closed 7 years ago

erichulburd commented 7 years ago

What versions of Tensorflow are these examples made for? If they are not compatible with newer versions of TF, can we update the readme to indicate as such?

I am trying to run:

gcloud ml-engine local train     --module-name trainer.task     --package-path trainer/     --     --train-files $TRAIN_DATA     --eval-files $EVAL_DATA     --train-steps 1000     --job-dir $MODEL_DIR

in census/estimator.

I receive the following error:

Traceback (most recent call last):
  File "/Users/arbolista/anaconda/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/Users/arbolista/anaconda/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/arbolista/Code/cloudml-samples-master/census/estimator/trainer/task.py", line 4, in <module>
    import model
  File "trainer/model.py", line 40, in <module>
    tf.feature_column.categorical_column_with_vocabulary_list(
AttributeError: 'module' object has no attribute 'feature_column'

System info:

>>> import sys
>>> sys.version
'2.7.10 (default, Feb  7 2017, 00:08:15) \n[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]
>>> import tensorflow
>>> tensorflow.__version__
'1.1.0'

(I installed tensorflow-gpu)

Mac OSx 10.12.5

Am I missing something, or has feature_column moved to contrib/layers?

puneith commented 7 years ago

@Arbolista Yes we are working on the update to 1.2. In the mean time can you run with 1.0 TF and your fdbk ack.

elibixby commented 7 years ago

@Arbolista 1.2 update is published as of yesterday. As of right now tensorflow==1.2.0 is the only requirement for running the census example and we'll be adding a requirements.txt to that effect shortly.

bbarnes52-zz commented 7 years ago

along the same lines, preprocessing fails for movielens with tensorflow 1.2 (if you run it remotely, with the output dir pointing to a GCS path) ... I think the same is probably true of the other scripts using tensorflow-transform

puneith commented 7 years ago

@bbarnes52 Thanks yes we are in the process of fixing it across the board. Thanks much for your patience while we fix it.

elmer-garduno commented 7 years ago

@bbarnes52 we think we have identified the issue when running the tft samples on osx with TF 1.2 will update the post as the fix becomes available.

elmer-garduno commented 7 years ago

@bbarnes52 can you please retry with the latest TF from nightly? The problem should be fixed.