Open imsazzad opened 5 years ago
I found an almost similar issue in BERT repo, and someone from their original collaborator fixed the issue. did you consider that update LINK: https://github.com/google-research/bert/issues/80#issuecomment-436823886 @kyzhouhzau ?
Traceback (most recent call last): File "BERT_NER.py", line 699, in
tf.app.run()
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 300, in run
_run_main(main, args)
File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "BERT_NER.py", line 618, in main
train_examples, label_list, FLAGS.max_seq_length, tokenizer, train_file)
File "BERT_NER.py", line 328, in filed_based_convert_examples_to_features
feature,ntokens,label_ids = convert_single_example(ex_index, example, label_list, max_seq_length, tokenizer, mode)
File "BERT_NER.py", line 285, in convert_single_example
label_ids.append(label_map[labels[i]])
KeyError: 'MY_LABEL'