Jester6136 / pubmedBERT-BiLSTM-CRF

Code for our ICTA 2023 paper "An Architecture for More Fine-grained Hidden Representation in Named Entity Recognition for Biomedical Texts"
Other
6 stars 1 forks source link

an unexpected keyword argument 'rnn_type' #1

Open lulei0926 opened 8 months ago

lulei0926 commented 8 months ago

If your task is similar to the task the model of the ckeckpoint was trained on, you can already use BertModel for predictions without further training. Traceback (most recent call last): File "train.py", line 87, in student=config.create_student(nocrf=args.nocrf) File "/content/drive/MyDrive/BC/pubmedBERT-BiLSTM-CRF/flair/config_parser.py", line 235, in create_student return self.create_model(self.config,pretrained=self.load_pretrained(self.config), is_student=True) File "/content/drive/MyDrive/BC/pubmedBERT-BiLSTM-CRF/flair/config_parser.py", line 202, in create_model tagger = getattr(models,classname)(**kwargs, config=config) TypeError: init() got an unexpected keyword argument 'rnn_type'

can you help me?

Jester6136 commented 8 months ago

@lulei0926 Could you provide me with more information about the config_file?

lulei0926 commented 8 months ago

The command i am using is: "CUDA_VISIBLE_DEVICES=0 python train.py --config config/pubmed_bilstm_crf.yaml". Except for using a local dataset, i haven't modified the content in the "config" file. I'm not sure why it's throwing such an error.

Jester6136 commented 7 months ago

@lulei0926 Sorry for the delayed response. You should remove rnn_type: LSTM.