seq2seq icon indicating copy to clipboard operation
seq2seq copied to clipboard

Flag parsing error in tensorflow 1.8

Open sbmaruf opened this issue 7 years ago • 2 comments

When I have tried to do the unite test it gives following error,

AttributeError: module 'tensorflow.python.platform.flags' has no attribute '_FlagValues'

it happens because of this line. But current tensorflow doesn't support this type of object initiation tf.app.flags._FlagValues(). It gets deprecated from tf1.5. What is the alternate workaround here.

sbmaruf avatar Jun 06 '18 15:06 sbmaruf

check out #285

onlyjackfrost avatar Jun 09 '18 05:06 onlyjackfrost

vim seq2seq/test/pipeline_test.py Update by:

def _clear_flags():
  """Resets Tensorflow's FLAG values"""
  #pylint: disable=W0212
  for flag_key in dir(tf.app.flags.FLAGS):
      delattr(tf.app.flags.FLAGS, flag_key)
  #tf.app.flags.FLAGS = tf.app.flags._FlagValues()
  tf.app.flags._global_parser = argparse.ArgumentParser()

flycsuu avatar Sep 20 '18 01:09 flycsuu