Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need Cuda-enabled GPU? In batcher_classification.py I am getting TypeError:unorderable types: int() > Flag() #5

Open
J-Fo-S opened this issue Oct 17, 2018 · 2 comments

Comments

@J-Fo-S
Copy link

J-Fo-S commented Oct 17, 2018

Hi,
Do I need to have a CUDA-enabled GPU to run this code? When I ignored that and tried executing the code, I received a TypeError:unorderable types: int() > Flag(). Not sure that this has anything to do with having a CUDA-enabled GPU, but I figured I'd mention it. The traceback is below - any advice on getting around this would be greatly appreciated. Seems like a very interesting approach and I'd really like to experiment with it.

  File "run_summarization.py", line 819, in <module>
    tf.app.run()
  File "/Users/jonathansherman/anaconda3/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 126, in run
    _sys.exit(main(argv))
  File "run_summarization.py", line 693, in main
    cla_batcher = ClaBatcher(hps_discriminator, vocab)
  File "/Users/jonathansherman/nlpir2018/final_project/Unpaired-Sentiment-Translation-master/batcher_classification.py", line 125, in __init__
    "train-original/*")
  File "/Users/jonathansherman/nlpir2018/final_project/Unpaired-Sentiment-Translation-master/batcher_classification.py", line 190, in fill_example_queue
    example = Example(review, score, self._vocab, self._hps)
  File "/Users/jonathansherman/nlpir2018/final_project/Unpaired-Sentiment-Translation-master/batcher_classification.py", line 43, in __init__
    if len(review_words) > hps.max_dec_steps: #:
TypeError: unorderable types: int() > Flag()```
@vineetjohn
Copy link

Not an author, but you're probably using a Tensorflow version greater than 1.4.1.
Tensorflow 1.5 has breaking changes that are not reverse compatible.

The code in this repository is heavy coupled to the version 1.4.1.
You'd have to downgrade to run this code.

@J-Fo-S
Copy link
Author

J-Fo-S commented Oct 31, 2018

Thank you much for the tip! I'll report back when I am able to try it in a few weeks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants