Ebiquity / CASIE

CyberAttack Sensing and Information Extraction
64 stars 22 forks source link

"from tensorflow import set_random_seed" fails #21

Closed GBR-613 closed 3 years ago

GBR-613 commented 3 years ago

The line "from tensorflow import set_random_seed" appearing in the following files:

  - nug_arg_detection.py 
  - parseJsontoFeatures.py 
  - prepare.py 
  - x2index.py 
  - nug_arg_detection_bert.py 

causes the following error: ImportError: cannot import name 'set_random_seed'

In TensorFlow2, tf.random.set_seed() should be used instead.

Are you using TensorFlow1, in contrary to what requirements.txt says?

staneeya commented 3 years ago

I think you are correct. The code is a little bit old.