macanv / BERT-BiLSTM-CRF-NER

Tensorflow solution of NER task Using BiLSTM-CRF model with Google BERT Fine-tuning And private Server services
https://github.com/macanv/BERT-BiLSMT-CRF-NER
4.71k stars 1.26k forks source link

tensorflow.python.framework.errors_impl.NotFoundError: ./BERT-BiLSTM-CRF-NER/output/eval; No such file or directory #277

Open wpy0521 opened 4 years ago

wpy0521 commented 4 years ago

有人遇到同样的问题吗?一直报没有路径,可是我生成了eval.tf_record文件

macanv commented 4 years ago

more info

duliping commented 4 years ago

I'm trying to train model, and I'm getting the same question. Error info as below:

Traceback (most recent call last): File "run.py", line 46, in <module> train_ner() File "run.py", line 39, in train_ner train(args=args) File "/home/jq/BERT-BiLSTM-CRF-NER-master/bert_base/train/bert_lstm_ner.py", line 631, in train tf.estimator.train_and_evaluate(estimator, train_spec, eval_spec) File "/home/dev/env/Python-3.6.2/lib/python3.6/site-packages/tensorflow/python/estimator/training.py", line 451, in train_and_evaluate return executor.run() File "/home/dev/env/Python-3.6.2/lib/python3.6/site-packages/tensorflow/python/estimator/training.py", line 590, in run return self.run_local() File "/home/dev/env/Python-3.6.2/lib/python3.6/site-packages/tensorflow/python/estimator/training.py", line 691, in run_local saving_listeners=saving_listeners) File "/home/dev/env/Python-3.6.2/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 376, in train loss = self._train_model(input_fn, hooks, saving_listeners) File "/home/dev/env/Python-3.6.2/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 1145, in _train_model return self._train_model_default(input_fn, hooks, saving_listeners) File "/home/dev/env/Python-3.6.2/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 1173, in _train_model_default saving_listeners) File "/home/dev/env/Python-3.6.2/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 1451, in _train_with_estimator_spec _, loss = mon_sess.run([estimator_spec.train_op, estimator_spec.loss]) File "/home/dev/env/Python-3.6.2/lib/python3.6/site-packages/tensorflow/python/training/monitored_session.py", line 583, in run run_metadata=run_metadata) File "/home/dev/env/Python-3.6.2/lib/python3.6/site-packages/tensorflow/python/training/monitored_session.py", line 1059, in run run_metadata=run_metadata) File "/home/dev/env/Python-3.6.2/lib/python3.6/site-packages/tensorflow/python/training/monitored_session.py", line 1150, in run raise six.reraise(*original_exc_info) File "/home/dev/env/Python-3.6.2/lib/python3.6/site-packages/six.py", line 693, in reraise raise value File "/home/dev/env/Python-3.6.2/lib/python3.6/site-packages/tensorflow/python/training/monitored_session.py", line 1135, in run return self._sess.run(*args, **kwargs) File "/home/dev/env/Python-3.6.2/lib/python3.6/site-packages/tensorflow/python/training/monitored_session.py", line 1215, in run run_metadata=run_metadata)) File "/home/dev/env/Python-3.6.2/lib/python3.6/site-packages/tensorflow/contrib/estimator/python/estimator/early_stopping.py", line 444, in after_run if self._should_stop_fn(): File "/home/dev/env/Python-3.6.2/lib/python3.6/site-packages/tensorflow/contrib/estimator/python/estimator/early_stopping.py", line 361, in stop_if_no_metric_improvement_fn eval_results = read_eval_metrics(eval_dir) File "/home/dev/env/Python-3.6.2/lib/python3.6/site-packages/tensorflow/contrib/estimator/python/estimator/early_stopping.py", line 300, in read_eval_metrics for event in _summaries(eval_dir): File "/home/dev/env/Python-3.6.2/lib/python3.6/site-packages/tensorflow/contrib/estimator/python/estimator/early_stopping.py", line 398, in _summaries os.path.join(eval_dir, _EVENT_FILE_GLOB_PATTERN)): File "/home/dev/env/Python-3.6.2/lib/python3.6/site-packages/tensorflow/python/lib/io/file_io.py", line 342, in get_matching_files for single_filename in filename File "/home/dev/env/Python-3.6.2/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py", line 519, in __exit__ c_api.TF_GetCode(self.status.status)) tensorflow.python.framework.errors_impl.NotFoundError: /home/jq/BERT-BiLSTM-CRF-NER-master/output/eval; No such file or directory