Open esther1262 opened 6 months ago
@esther1262 I think the version of transformers we used is transformers==4.12.5
, if you can create a virtual env and use this version, it should work.
Meanwhile, @chenaokun @cpenguf any of u can check the transformers package compatibility issue and we might need to update this repo for any break updates.
Hi, I couldn't install transformers earlier than version 4.34.0. It gave me the following errors:
ERROR: Failed building wheel for tokenizers
Failed to build tokenizers
ERROR: Could not build wheels for tokenizers, which is required to install pyproject.toml-based projects
So I installed ver 4.34.0 which also contains ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST. It's just there were some warnings:
/home/user/anaconda3/envs/nlp/lib/python3.12/site-packages/transformers/utils/generic.py:311: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
torch.utils._pytree._register_pytree_node(
/home/user/anaconda3/envs/nlp/lib/python3.12/site-packages/transformers/utils/generic.py:311: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
Otherwise, the code is working. Thanks.
Hi, I couldn't install transformers earlier than version 4.34.0. It gave me the following errors:
ERROR: Failed building wheel for tokenizers Failed to build tokenizers ERROR: Could not build wheels for tokenizers, which is required to install pyproject.toml-based projects
So I installed ver 4.34.0 which also contains ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST. It's just there were some warnings:
/home/user/anaconda3/envs/nlp/lib/python3.12/site-packages/transformers/utils/generic.py:311: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead. torch.utils._pytree._register_pytree_node( /home/user/anaconda3/envs/nlp/lib/python3.12/site-packages/transformers/utils/generic.py:311: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
Otherwise, the code is working. Thanks.
Great to know. Thanks.
Hi, I followed this tutorial with the sample data. https://github.com/uf-hobi-informatics-lab/ClinicalTransformerNER/blob/master/tutorial/pipeline_preprocessing_model_training_prediction.ipynb
Everything worked well until I ran the command
python ../src/run_transformer_ner.py
. I use anaconda and I installed transformer v4.41 using conda forge. Pytorch was installed using conda too for linux and cuda 12.1. TheClinicalTransformerNER
folder is stored in/home/user
. I stored the training data in/home/user/language model/sample data/ddi_bio/merge
.This is the command I used:
Here is the error I got:
Can someone please help how to fix the error? I restarted the computer already. In python, I can run commands like
from transformers import TFBertModel, BertModel
but there's nothing namedALBERT_PRETRAINED_MODEL_ARCHIVE_LIST
or any PRETRAINED_MODEL_ARCHIVE_LIST intransformers/__init__.py
.Thanks