Skip to content
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

ImportError: Using the Trainer with PyTorch requires `accelerate>=0.20.1 #6

Open
secedit opened this issue Oct 22, 2023 · 2 comments
Open

Comments

@secedit
Copy link

secedit commented Oct 22, 2023

ImportError Traceback (most recent call last)
in <cell line: 10>()
8 # Train model
9 generator = StatementGenerator()
---> 10 model, tokenizer = generator(
11 "google/flan-t5-small",
12 dataset,

7 frames
/usr/local/lib/python3.10/dist-packages/transformers/training_args.py in _setup_devices(self)
1799 if not is_sagemaker_mp_enabled():
1800 if not is_accelerate_available(min_version="0.20.1"):
-> 1801 raise ImportError(
1802 "Using the Trainer with PyTorch requires accelerate>=0.20.1: Please run pip install transformers[torch] or pip install accelerate -U"
1803 )

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.

It is a Colab error. how can i handle this error

@davidmezzetti
Copy link
Member

The fix is installing txtai[pipeline-train]. Next time I'm updating this project, I'll make the change to setup.py.

@DeadSurfer
Copy link

The fix is installing txtai[pipeline-train]. Next time I'm updating this project, I'll make the change to setup.py.

still error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants