src-d / hercules

Gaining advanced insights from Git repository history.
Other
2.63k stars 334 forks source link

Upgrade to TensorFlow 2? #328

Open gawth opened 5 years ago

gawth commented 5 years ago

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

vmarkovtsev commented 5 years ago

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.