From e9dbd3926317a4effb1d033d8454ff18280d0b7d Mon Sep 17 00:00:00 2001 From: Akshay Chintalapati <64036106+akshayvkt@users.noreply.github.com> Date: Mon, 6 Nov 2023 06:21:48 -0800 Subject: [PATCH] Update sequence_classification.md (#27281) I'm adding accelerate as one of the libraries to install because otherwise when running the Trainer, the model errorr out with the error. ImportError: Using the `Trainer` with `PyTorch` requires `accelerate>=0.20.1`: Please run `pip install transformers[torch]` or `pip install accelerate -U` Further context: 1. I've tried this across different environments so I believe that the environment is not the issue. 2. I had the latest transformers library version running. 3. Typically even after install accelerate and import it, it wouldn't resolve the issue until I restart the notebook and try again. --- docs/source/en/tasks/sequence_classification.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/en/tasks/sequence_classification.md b/docs/source/en/tasks/sequence_classification.md index b67d43453d..7068e7ce08 100644 --- a/docs/source/en/tasks/sequence_classification.md +++ b/docs/source/en/tasks/sequence_classification.md @@ -44,7 +44,7 @@ The task illustrated in this tutorial is supported by the following model archit Before you begin, make sure you have all the necessary libraries installed: ```bash -pip install transformers datasets evaluate +pip install transformers datasets evaluate accelerate ``` We encourage you to login to your Hugging Face account so you can upload and share your model with the community. When prompted, enter your token to login: