thunlp / PELT

Source code for "A Simple but Effective Pluggable Entity Lookup Table for Pre-trained Language Models"
43 stars 8 forks source link

sir, when i run run_wiki80.py, i will find no moudle named 'RobertaEntForMarkerSequenceClassification' #8

Closed eurkaaaa closed 1 year ago

eurkaaaa commented 1 year ago

sir, In your code, when i run run_wiki80.py, i will find no moudle named 'RobertaEntForMarkerSequenceClassification'. It seems that 'RobertaEntForMarkerSequenceClassification' is not in transformers you privided.

(pytorch) $ CUDA_VISIBLE_DEVICES=0 python3 run_wiki80.py --model_type roberta --model_name_or_path roberta-base --do_train --do_eval --data_dir data/wiki80 --max_seq_length 128 --per_gpu_eval_batch_size 64 --per_gpu_train_batch_size 32 --gradient_accumulation_steps 1 --learning_rate 3e-5 --save_steps 1000 --evaluate_during_training --overwrite_output_dir --fp16 --output_dir wiki80_models/roberta-42 --seed 42 --embed_path ../wiki_fewrel_embed/ --modL 7 --num_train_epochs 5 --train_file train.jsonl
Traceback (most recent call last): File "run_wiki80.py", line 37, in from transformers import (WEIGHTS_NAME, BertConfig, ImportError: cannot import name 'RobertaEntForMarkerSequenceClassification' from 'transformers' (/home/lihao/桌面/transformers/src/transformers/init.py)

YeDeming commented 1 year ago

Sorry, I added it to the folder transformers just now.