AI4Finance-Foundation / FinGPT

FinGPT: Open-Source Financial Large Language Models! Revolutionize 🔥 We release the trained model on HuggingFace.
https://ai4finance.org
MIT License
13.48k stars 1.88k forks source link

pip install accerate #89

Closed itlittlekou closed 6 months ago

itlittlekou commented 11 months ago

ImportError Traceback (most recent call last) in <cell line: 1>() ----> 1 training_args = TrainingArguments( 2 output_dir='finetuned_model', # saved model path 3 logging_steps = 500, 4 # max_steps=10000, 5 num_train_epochs = 2,

4 frames /usr/local/lib/python3.10/dist-packages/transformers/training_args.py in _setup_devices(self) 1670 if not is_sagemaker_mp_enabled(): 1671 if not is_accelerate_available(min_version="0.20.1"): -> 1672 raise ImportError( 1673 "Using the Trainer with PyTorch requires accelerate>=0.20.1: Please run pip install transformers[torch] or pip install accelerate -U" 1674 )

ImportError: Using the Trainer with PyTorch requires accelerate>=0.20.1: Please run pip install transformers[torch] or pip install accelerate -U


NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the "Open Examples" button below.

You have encountered the same issue even after updating accelerate to version 0.23.0. How can you resolve this?

Weiyao-Li commented 6 months ago

try to install and then restart the session. This should solve the issue.