bert
bert copied to clipboard
run_classifier error with CoLA dataset
Default MRPC runs fine, change task name to CoLA, got following error with run_classifier:
Traceback (most recent call last):
File "run_classifier.py", line 917, in <module>
tf.app.run()
File "/home/tf3/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "run_classifier.py", line 830, in main
train_examples, label_list, FLAGS.max_seq_length, tokenizer, train_file)
File "run_classifier.py", line 466, in file_based_convert_examples_to_features
max_seq_length, tokenizer)
File "run_classifier.py", line 432, in convert_single_example
label_id = label_map[example.label]
KeyError: '#1 ID'
Anyone has seen this error? Thx.
The return of ColaProcessor.get_labels should match your own dataset's labels. Also, the format of your dataset seems not meet the demand format.
CoLA is one of 4 supported datasets/tasks coming in original codes, not my own dataset. The dataset was also downloaded by following instruction in readme.md.
try to pull from the git and rerun your app again.