0

I have an error in the Tensorflow model "Textsum" (https://github.com/tensorflow/models/tree/master/textsum)

When running

 bazel-bin/textsum/seq2seq_attention \
 --mode=train \
 --article_key=article \
 --abstract_key=abstract \
 --data_path=data/bin_data_train\
 --vocab_path=data/vocab \
 --log_root=textsum/log_root \
 --train_dir=textsum/log_root/train

in my initial training run, I get this error:

ERROR:tensorflow:Found input thread dead.
Exception in thread Thread-377:
Traceback (most recent call last):
  File      "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.    py", line 916,     in _bootstrap_inner
self.run()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 864,    in run
self._target(*self._args, **self._kwargs)
  File "/Users/johnjosephhiggins/PycharmProjects/prometheadj/models/textsum/batch_reader.py",     line 136, in _FillInputQueue
(article, abstract) = input_gen.next()
 AttributeError: 'generator' object has no attribute 'next'

I've done everything correctly, as far as I know. I'm running on CPU-- no CUDA. I have a pretty new Mac, OS Yosemite with 8GB free. Python 3.6.

I think the first error "Input thread dead" might be tied to the second "no attribute next." I opened a pull request in the tensorflow models master repochanging

.next( )

to

.__next__( )

in 'batch_reader.py'. That removes the "no attribute 'next'" and "found thread dead" errors, but causes training to stop after the first global step. I waited for ~3 hours and received no new messages from either tensorboard or terminal. Training just stopped-- no new progress, no checkpoints met.

Any thoughts? Is my pull request worth a shot?

Tom Higgins
  • 99
  • 2
  • 10
  • 1
    The pull request would almost certainly be welcome, although I think it would be more portable to replace `input_gen.next()` with `next(input_gen)` (as this should be defined on both Python 2.7 and 3.x). As for the hanging issue, this sounds like a bug, and opening [an issue on the tensorflow/models repository](https://github.com/tensorflow/models/issues) would be the best way to go. – mrry Apr 25 '17 at 00:32
  • @mrry The TF mod from Google also suggested that, assuming that six.next(iter) and next( ) are roughly the same. Thanks for the help! – Tom Higgins Apr 25 '17 at 00:39

0 Answers0