allenai / allenai/bi-att-flow

Dev branch fails with TF r1.4

Ouverte
#69 25 commentaires 4 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
1.5k
Forks
668
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

ubuntu 16.04, python3.5, cuda9.0, cudnn7.0 nccl2, follow the installation and all is fine.
python3 -m basic.cli --mode train --noload --debug
fails..first on _linear
solution per issue 41
from tensorflow.contrib.rnn.python.ops.rnn_cell import _Linear
then there is a problem with flags. R1.4 handles argument parsing differently and adding components to config causes errors in the flag parsing as they are not declared as flags
and then change the call in the nn.py…but then I hit
File "/home/levinth/bi-att-flow/basic/cli.py", line 112, in
tf.app.run()
File "/home/levinth/tf_r1.4_c9_mpi_py3/tensorflow/python/platform/app.py", line 124, in run
_sys.exit(main(argv))
File "/home/levinth/bi-att-flow/basic/cli.py", line 107, in main
config.out_dir = os.path.join(config.out_base_dir, config.model_name, str(config.run_id).zfill(2))
File "/home/levinth/tf_r1.4_c9_mpi_py3/tensorflow/python/platform/flags.py", line 88, in __setattr__
return self.__dict__['__wrapped'].__setattr__(name, value)
File "/home/levinth/tf_r1.4_c9_mpi_py3/absl/flags/_flagvalues.py", line 496, in __setattr__
return self._set_unknown_flag(name, value)
File "/home/levinth/tf_r1.4_c9_mpi_py3/absl/flags/_flagvalues.py", line 374, in _set_unknown_flag
raise _exceptions.UnrecognizedFlagError(name, value)
absl.flags._exceptions.UnrecognizedFlagError: Unknown command line flag 'out_dir'

ultimately I added a lot of flags but was not sure what to do when a matrix was added to config.
After adding all these…
#flags added for R1.4?
flags.DEFINE_string("out_dir", "out", "out dir [out]")
flags.DEFINE_string("save_dir", "save", "save dir [save]")
flags.DEFINE_string("log_dir", "log", "log dir [log]")
flags.DEFINE_string("eval_dir", "eval", "eval dir [eval]")
flags.DEFINE_string("answer_dir", "answer", "answer dir [answer]")
flags.DEFINE_integer("max_num_sents", 0, "max_num_sents")
flags.DEFINE_integer("max_sent_size", 0, "max_sent_size")
flags.DEFINE_integer("max_ques_size", 0, "max_ques_size")
flags.DEFINE_integer("max_word_size", 0, "max_word_size")
flags.DEFINE_integer("max_para_size", 0, "max_para_size")
flags.DEFINE_integer("char_vocab_size", 0, "char_vocab_size")
flags.DEFINE_integer("word_emb_size", 0, "word_emb_size")
flags.DEFINE_integer("word_vocab_size", 0, "word_vocab_size")
I hit the issue that emb_mat is not a flag

emb_mat = np.array([idx2vec_dict[idx] if idx in idx2vec_dict
else np.random.multivariate_normal(np.zeros(config.word_emb_size), np.eye(config.word_emb_size))
for idx in range(config.word_vocab_size)])
config.emb_mat = emb_mat

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.