KeyError with a fine-tuned model
I've fine-tuned the allenai's scibert to do some NER using the `run_ner.py` script, but I keep bumping into a key error. My code is the following:
```
m = AutoModel.from_pretrained("models/sciBERT_ner_e50/")
tok = AutoTokenizer.from_pretrained("allenai/scibert_scivocab_uncased")
nlp = pipeline("ner", model=m, tokenizer=tok) 
```
where models/scibert_ner_e50 contains my model and the files it needs to run properly.

when i run something like `nlp(abstract)`, the code crashes and sends me the following error:
```
KeyError                                  Traceback (most recent call last)
<ipython-input-86-793f89d86633> in <module>
      3         if(len(row.abstract.split())<512):
      4             abst = row.abstract
----> 5             print(nlp(abst))
      6 
      7     except ValueError as ve:

c:\users\tbabi\appdata\local\programs\python\python37\lib\site-packages\transformers\pipelines.py in __call__(self, *texts, **kwargs)
    792             answer = []
    793             for idx, label_idx in enumerate(labels_idx):
--> 794                 if self.model.config.id2label[label_idx] not in self.ignore_labels:
    795                     answer += [
    796                         {

KeyError: 422
```

Has anyone else been meeting this error ? I've been struggling with this for quiet some time now, and any advice/thoughts/insights on what's going on would be greatly appreciated :) 

Thank you !
How many labels/entities are there in your model ? Can you check if the key 422 exists in the models config's id2label by printing it or by opening the config file. You can print config using `model.config` <|||||>Hello
It seems I had simply been misusing my model : I was instantiating an `AutoModel`, when I should have been using the `BertForTokenClassification` class. 
Thanks anyway ! :) 