yahshibu / nested-ner-tacl2020-transformers

Implementation of Nested Named Entity Recognition using BERT
GNU General Public License v3.0
138 stars 24 forks source link

BUG: IndexError in sequence_labeling.py #8

Closed XinyanLi2016 closed 3 years ago

XinyanLi2016 commented 3 years ago

Hi, yahshibu! Recently, I retrain your code with GENIA corpus without fine tuning. But I met an error, which is "IndexError: tuple index out of range". Traceback shows as this: image

I can't find why this error happened. Could you help me? Thanks a lot!

yahshibu commented 3 years ago

Thank you for having an interest in our work.

Could you try using PyTorch v1.6.0 and Transformers v2.1.1 instead of the latest versions of them? I believe that this will work.

I'm sorry I'm busy now and I can't immediately fix a bug under the latest versions.

XinyanLi2016 commented 3 years ago

Thanks for your reply, I will try it!

mahmoudSalim commented 3 years ago

Hi @yahshibu I have a similar error and I'm using PyTorch v1.6.0 and Transformers v2.1.1 When running train.py, it runs the first epoch just fine and save a checkpoint in dumps folder, but before executing the second epoch that error appears. Screenshot from 2021-10-28 17-38-34

yahshibu commented 3 years ago

@XinyanLi2016 @mahmoudSalim I updated this repository so that it works with the latest versions, PyTorch (v1.10.0) and Transformers (v4.12.0). I've confirmed that this works on my local computer. Could you update your local code and try it? Sorry for bothering you.