I ran the official tutorial from Google ( \ " main \", fname, loader, pkg_name) \ n File \ "/ usr / lib / python 2.7 / runpy.py \", line 72, in _run_code \ n exec code in the run_globals file \ n \ "/root/.local/lib/python2.7/site-packages/trainer/task.py \", line 4, in the \ n import model \ n File \ "/root/.local/lib/python2 .7 / site-packages / trainer / model.py \ ", line 40, in \ n tf.feature_column.categorical_column_with_vocabulary_list (\ nAttributeError: Object 'module' does not have attribute 'feature_column' \ n "
// UPDATE
Nothing. I understood. It turns out that the --runtime-version argument controls the version of Runtime Cloud ML (). In the tutorial, it was listed as 1.0, and this corresponds to Tensorflow v 1.0.1, which does not have tf.feature_column.* , Because it was just introduced in Tensorflow v 1.2.0 on June 16, 2017.
--runtime-version
tf.feature_column.*
// UPDATE 2
The Google tutorial has been updated to use --runtime-version 1.2 instead of --runtime-version 1.0 as of today, June 29, 2017. I donโt know if they saw my post, but this was changed from June 28 to June 29. Future users in this tutorial should not experience the same problem as me.
--runtime-version 1.2
--runtime-version 1.0
This can also happen when updating the Google Cloud SDK, in which case pip install --upgrade tensorflow should complete the task.
pip install --upgrade tensorflow
I ran into this problem with an outdated version of tensor flow. Updating it to the latest build helped.
Source: https://habr.com/ru/post/1269309/More articles:How to add empty spaces in MD markdown readme on GitHub? - githubHow to draw a classic stock chart with matplotlib? - pythonHow to use wsHttpBinding with message security through a load balancer - wcfto stop WCF from caching / reusing security tokens (SecurityContextToken) - wcfHow to make HOC in response - javascriptThe log shows an error object: {"isTrusted": true} instead of the actual error data - javascriptWhat are mtime updates after writing to memory mapped files? - linuxAngular 2 dependencies - javascriptcreating paraphrases of English text using PPDB - pythonno dependencies detected when importing monaco-editor with webpack - node.jsAll Articles