luheng / lsgn

Labeled Span Graph Networks
Apache License 2.0
118 stars 27 forks source link

Is tensorflow version 1.8 for sure? #9

Open skumyol opened 4 years ago

skumyol commented 4 years ago

Traceback (most recent call last): File "decoder.py", line 12, in from lsgn_data import LSGNData File "/hltc/0/cl/tools/srl_parsers/l_he_etal_2018/lsgn/lsgn_data.py", line 2, in import tensorflow_hub as hub File "/homes/skumyol/venv2.7/lib/python2.7/site-packages/tensorflow_hub/init.py", line 29, in from tensorflow_hub.estimator import LatestModuleExporter File "/homes/skumyol/venv2.7/lib/python2.7/site-packages/tensorflow_hub/estimator.py", line 25, in from tensorflow_hub import tf_utils File "/homes/skumyol/venv2.7/lib/python2.7/site-packages/tensorflow_hub/tf_utils.py", line 33, in from tensorflow.python.feature_column import feature_column_v2 ImportError: cannot import name feature_column_v2

savan77 commented 4 years ago

@skumyol I spent hours trying to make it work. If you are using Python3, then you also need to add parenthesis around print statements. It didn't work with 1.8 but it worked on 1.14.0 for me. You will also need to add a symbolic link since the .so file in 1.14.0 is different. ln -s libtensorflow_framework.so.1 libtensorflow_framework.so I pushed all required changes for Python3 here: https://github.com/savan77/lsgn/tree/python3

awxro commented 3 years ago

I'm running it in python 2.7. The error comes comes from tf-hub. I used tensorflow-hub==0.2.0