-
Notifications
You must be signed in to change notification settings - Fork 25.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no dependency package accelerate
installed when we install transformers v4.29.1
#23323
Comments
Hi @PenghuiCheng, All of the examples have their own unique requirements, which are listed in their own |
@PenghuiCheng you need to do |
same error ! any solution |
@mohamedoh you need to do |
I face the same issue even after the installations |
@flckv if you're in a notebook or similar you'll need to restart the session. Does |
|
@Krish1375 you may need to restart the notebook session to use the new/installed lib |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
I have the same issue but apparently, there is no solution for it. |
Did exactly what was written on colab.research: ran the first cell, was ok. |
Got the same problem as well, any solution ? |
I have same issue, nothing worked for me and accelerate is never detected by transformers. |
My bad, just realized I did not run on GPU, had to switch to GPU mode in collab settings. Now worked. Check your environnment and be sure you are on aGPU (CPU by default). |
System Info
transformers v4.29.1
torch 2.0.1
Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
cd examples/pytorch/text-classification
export TASK_NAME=mrpc
python run_glue.py --model_name_or_path bert-base-cased --task_name $TASK_NAME --do_train --do_eval --max_seq_length 128 --per_device_train_batch_size 32 --learning_rate 2e-5 --num_train_epochs 3 --output_dir /tmp/$TASK_NAME
the log is:
Traceback (most recent call last):
File "/home/penghuic/transformers/examples/pytorch/text-classification/run_glue.py", line 623, in
main()
File "/home/penghuic/transformers/examples/pytorch/text-classification/run_glue.py", line 217, in main
model_args, data_args, training_args = parser.parse_args_into_dataclasses()
File "/home/penghuic/transformers/src/transformers/hf_argparser.py", line 346, in parse_args_into_dataclasses
obj = dtype(**inputs)
File "", line 111, in init
File "/home/penghuic/transformers/src/transformers/training_args.py", line 1333, in post_init
and (self.device.type != "cuda")
File "/home/penghuic/transformers/src/transformers/training_args.py", line 1697, in device
return self._setup_devices
File "/home/penghuic/transformers/src/transformers/utils/generic.py", line 54, in get
cached = self.fget(obj)
File "/home/penghuic/transformers/src/transformers/training_args.py", line 1613, in _setup_devices
raise ImportError(
ImportError: Using the
Trainer
withPyTorch
requiresaccelerate
: Runpip install --upgrade accelerate
Expected behavior
we expect the dependency package
accelerate
will be installed when we install transformers.The text was updated successfully, but these errors were encountered: