How can i make fine tuning with new entities/labels?
Hi, i would like to fine tune the bert model with my own labels, like [COLOR, MATERIAL] and not the normal "NAME", "ORG". I'm following this Colab: https://colab.research.google.com/drive/14rYdqGAXJhwVzslXT4XIwNFBwkmBWdVV
I prepared train.txt, eval.txt, test.txt like this:
-DOCSTART- -X- -X- O
blue B-COLOR motorcicle B-CATEGORY steel B-MATERIAL etc.
But whene i execute this command
!python run_ner.py --data_dir=data/ --bert_model=bert-base-multilingual-cased --task_name=ner --output_dir=out_ner --max_seq_length=128 --do_train --num_train_epochs 5 --do_eval --warmup_proportion=0.1
i get this error
`
File "run_ner.py", line 594, in
File "run_ner.py", line 464, in main train_examples, label_list, args.max_seq_length, tokenizer)
File "run_ner.py", line 210, in convert_examples_to_features label_ids.append(label_map[labels[i]])
KeyError: 'B-COLOR' `
Did you change the labels in get_labels() method?