Open ahmedsohair opened 3 months ago
Hi,
We have checked and updated the command, please try the following:
python examples/pytorch/text-classification/run_glue.py \
--model_name_or_path bert-base-uncased \
--do_train \
--do_predict \
--num_train_epochs 5 \
--gradient_accumulation_steps 4 \
--test_file data/AA_data/AA_cls_test.json \
--validation_file data/AA_data/AA_cls_val.json \
--train_file data/AA_data/AA_cls_train.json \
--output_dir AA_region_cls/ \
--overwrite_output_dir \
--per_device_train_batch_size=128 \
--per_device_eval_batch_size=32 \
--save_strategy no \
--evaluation_strategy epoch
If you still get the "ValueError: --do_predict requires a test dataset", please use print(raw_datasets)
before the error line to check if it includes train, validation, and test datasets.
The Command that I used is as follows:
I ensured that the paths to the dataset is correct, the train, test and valid file are all in the same folder. Also, one thing i noticed with the script you posted is that the file being used for validation as well as test is the same??