-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Key Error on Sentence Classification example #80
Comments
Oops, I introduced a bug this morning. I just fixed it now. |
@jacobdevlin-google thanks |
so how did u solve it in the end?? |
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'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??
|
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) |
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'
The text was updated successfully, but these errors were encountered: