hey @Mariam, as described in the docs for TrainingArguments
you may also need to configure eval_steps
in addition to evaluation_strategy
.
for example to evaluate every 100 steps with run_qa.py
you could try the following:
python run_qa.py \
--model_name_or_path bert-base-uncased \
--dataset_name squad \
--do_train \
--do_eval \
--per_device_train_batch_size 12 \
--learning_rate 3e-5 \
--num_train_epochs 2 \
--max_seq_length 384 \
--doc_stride 128 \
--output_dir /tmp/debug_squad/ \
--evaluation_strategy steps \
--eval_steps 100
by default, the trainer will evaluate every 500 steps (the value of loggin_steps
) if eval_steps
is not specified