I was trying to run the sentence classification example step by step but there is a keyerror happened at very beginning as following:
INFO:tensorflow:Writing example 0 of 3669
Traceback (most recent call last):
File "run_classifier.py", line 908, in
tf.app.run()
File "/home/guyang/anaconda2/envs/BERT/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "run_classifier.py", line 824, in main
train_examples, label_list, FLAGS.max_seq_length, tokenizer, train_file)
File "run_classifier.py", line 458, in file_based_convert_examples_to_features
max_seq_length, tokenizer)
File "run_classifier.py", line 428, in convert_single_example
label_id = label_map[example.label]
KeyError: '\ufeffQuality'
Oops, I introduced a bug this morning. I just fixed it now.
@jacobdevlin-google thanks
@jacobdevlin-google thanks
so how did u solve it in the end??
Oops, I introduced a bug this morning. I just fixed it now.
I have pulled the lastest version (i.e. 21 days ago with self-written processors,)seems this kind of error happens again
Seems there is some bug on line 489 of run_classifier.py.
I added a tab before features and everything is fine
I've tried adding the tab at line 489 but it doesn't fix the error, any suggestions? thanks :)
well, this tab does not help. could u show your data and data processor??
I've tried adding the tab at line 489 but it doesn't fix the error, any suggestions? thanks :)
You need to hide the row index from your data frame in time of saving to tsv. It could be df.to_csv('train.tsv', sep='\t', index=False, header=False)
Most helpful comment
Seems there is some bug on line 489 of run_classifier.py.
I added a tab before features and everything is fine