transformers
transformers copied to clipboard
`is_torch_tpu_available() got an unexpected keyword argument 'check_device'`
System Info
transformers==4.18.0 pytorch==1.12.0 pytorch-lightning==1.6.0
Who can help?
@patrickvonplaten @sgugger @SaulLu
When I run examples/pytorch/question-answering/run_qa.py
, it reports a bug that is_torch_tpu_available() got an unexpected keyword argument 'check_device'
. I don't know why this problem happens. Could you help me solve this problem?
Information
- [X] The official example scripts
- [ ] My own modified scripts
Tasks
- [X] An officially supported task in the
examples
folder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below)
Reproduction
python run_qa.py
--model_name_or_path xlm-roberta-base
--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
--version_2_with_negative
--doc_stride 128
--output_dir /tmp/debug_squad/
Expected behavior
Could you help me solve this problem?
You are trying to run the examples of the main branch along with an older version of Transformers. Either upgrade your Transformers or use the examples matching v4.18.0.
Thanks for your response.