huggingface / transformers

🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
132.07k stars 26.31k forks source link

Persistent ImportError with TrainingArguments in Hugging Face Transformers despite installing accelerate and dependencie #33216

Open pemochamdev opened 2 weeks ago

pemochamdev commented 2 weeks ago

System Info

Who can help?

No response

Information

Tasks

Reproduction

from transformers import TrainingArguments training_args = TrainingArguments( output_dir='./output', do_train=True, do_eval=True, num_train_epochs=100,
per_device_train_batch_size=32,
per_device_eval_batch_size=16, warmup_steps=100,
weight_decay=0.05, logging_strategy='steps', logging_dir='./multi-class-logs',
logging_steps=50, evaluation_strategy="steps", eval_steps=50, save_strategy="steps", load_best_model_at_end=True )

Expected behavior

Expected Behavior:

I expect the TrainingArguments class from the Hugging Face transformers library to initialize without any ImportError when I have installed all required dependencies (transformers, accelerate, and PyTorch). Specifically, after running the following commands:

pip install transformers[torch] pip install accelerate -U

LysandreJik commented 2 weeks ago

Hey @pemochamdev, I'm sorry but I don't see the error you have?

LysandreJik commented 2 weeks ago

Can you please copy paste the stack trace here