hercules icon indicating copy to clipboard operation
hercules copied to clipboard

Upgrade to TensorFlow 2?

Open gawth opened this issue 4 years ago • 1 comments

Hi,

when I run the couples-files I get the following error:

Running: couples-files
Traceback (most recent call last):
  File "/usr/bin/labours", line 11, in <module>
    load_entry_point('labours', 'console_scripts', 'labours')()
  File "/home/alan/dev/hercules/python/labours/cli.py", line 449, in main
    modes[mode]()
  File "/home/alan/dev/hercules/python/labours/cli.py", line 293, in couples_files
    *train_embeddings(*reader.get_files_coocc(), tmpdir=args.tmpdir),
  File "/home/alan/dev/hercules/python/labours/embeddings.py", line 22, in train_embeddings
    from labours._vendor import swivel
  File "/home/alan/dev/hercules/python/labours/_vendor/swivel.py", line 65, in <module>
    flags = tf.app.flags
AttributeError: module 'tensorflow' has no attribute 'app'

I presume this is because the forked version of swivel you are running is still locked in to an old version of TensorFlow.

Any plans to upgrade? Alternatively, what version of TensorFlow would I need to run? Thanks Alan

gawth avatar Nov 23 '19 20:11 gawth

Hi. Indeed, the embedded Swivel model requires 1.x. I would bisect down starting from 1.14. AFAIR 1.0 should definitely work. I could not include it into requirements.txt, and the optional constraint in setup.py was overseen.

Thanks for noticing, I definitely need to upgrade.

vmarkovtsev avatar Nov 24 '19 15:11 vmarkovtsev