Closed HelloWorldLTY closed 2 months ago
Furthermore, DNABERT-2 embedder seems not work:
Traceback (most recent call last):
File "/gpfs/radev/project/ying_rex/tl688/BEND/testcode.py", line 7, in <module>
embedder = bend.embedders.DNABert2BertModel('zhihan1996/DNABERT-2-117M')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/gpfs/radev/project/ying_rex/tl688/BEND/bend/models/dnabert2.py", line 569, in __init__
super(BertModel, self).__init__(config)
File "/gpfs/radev/project/ying_rex/tl688/llm/lib/python3.11/site-packages/transformers/modeling_utils.py", line 1357, in__init__
raise ValueError(
ValueError: Parameter config in `BertModel(config)` should be an instance of class `PretrainedConfig`. To create a model from a pretrained model use `model = BertModel.from_pretrained(PRETRAINED_MODEL_NAME)`
Yes, that was wrong indeed. Should have been bend.utils.embedders
- fixed now.
As for the latter issue, please use DNABert2Embedder
, not DNABert2BertModel
.
Thanks a lot
Hi, I found that the example code in the readme file cannot work:
The error is: Traceback (most recent call last): File "/gpfs/radev/project/ying_rex/tl688/BEND/testcode.py", line 4, in
from bend.embedders import NucleotideTransformerEmbedder
ModuleNotFoundError: No module named 'bend.embedders'
Would you please consider fixing them? Thanks.