jerryji1993 / DNABERT

DNABERT: pre-trained Bidirectional Encoder Representations from Transformers model for DNA-language in genome

Home Page:https://doi.org/10.1093/bioinformatics/btab083

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot import name 'BertForLongSequenceClassification'

vedashreebhandare opened this issue · comments

Hello, I am running run_finetune.py for binary classification and using the pretrained model DNABERT-6, but I am getting an error cannot import name 'BertForLongSequenceClassification' .
Can some please help me with this?

commented

I am also getting the same error.I'm try to change the transformers 3.3、4.0+,but can't solve this problem.

commented

I'm using transformers == 2.5.0, getting an error:OSError: Model name 'dna6' was not found in tokenizers model name list (dna3, dna4, dna5, dna6). We assumed 'dna6' was a path, a model identifier, or url to a directory containing vocabulary files named ['vocab.txt'] but couldn't find such vocabulary files at this path or url.

I solved this error by moving the folder "transformers" under "src" to the folder example("example/transformers").

I tried moving the folder "transformers" to "example" but that did not solve the issue for me