Closed GarrettLee closed 3 years ago
I find that after deleting the cache, the results can be reproduced. I guess that is because in my first attempt, I used the wrong arguments setting, and something is cached. Then although I fixed the setting later, the code alway loads from the wrong cache.
Environment info
transformers
version: 3.2.0Who can help
@stefan-it Please help.
Information
Model I am using (Bert, XLNet ...): bert-base-multilingual-cased
The problem arises when using:
I am running the pytorch version: transformers/examples/token-classification/run_ner.py
The tasks I am working on is:
GermEval 2014 (German NER) dataset
To reproduce
Steps to reproduce the behavior:
export MAX_LENGTH=128 export BERT_MODEL=./bert-base-multilingual-cased
python3 scripts/preprocess.py train.txt.tmp $BERT_MODEL $MAX_LENGTH > train.txt python3 scripts/preprocess.py dev.txt.tmp $BERT_MODEL $MAX_LENGTH > dev.txt python3 scripts/preprocess.py test.txt.tmp $BERT_MODEL $MAX_LENGTH > test.txt
cat train.txt dev.txt test.txt | cut -d " " -f 2 | grep -v "^$"| sort | uniq > labels.txt
export OUTPUT_DIR=germeval-model export BATCH_SIZE=32 export NUM_EPOCHS=3 export SAVE_STEPS=750 export SEED=1
python3 run_ner.py --data_dir ./ \ --labels ./labels.txt \ --model_name_or_path $BERT_MODEL \ --output_dir $OUTPUT_DIR \ --max_seq_length $MAX_LENGTH \ --num_train_epochs $NUM_EPOCHS \ --per_device_train_batch_size $BATCH_SIZE \ --save_steps $SAVE_STEPS \ --seed $SEED \ --do_train \ --do_eval \ --do_predict