notebooks icon indicating copy to clipboard operation
notebooks copied to clipboard

fix accelerate version problem

Open panpan0000 opened this issue 2 years ago • 2 comments
trafficstars

What does this PR do?

Add necessary steps.

Fixes # (issue)

running the notebook in colab, failure will show up.

ImportError                               Traceback (most recent call last)
[<ipython-input-3-e0222726b472>](https://localhost:8080/#) in <cell line: 3>()
      1 from transformers import TrainingArguments
      2 
----> 3 training_args = TrainingArguments(output_dir="test_trainer")

4 frames
[/usr/local/lib/python3.10/dist-packages/transformers/training_args.py](https://localhost:8080/#) in _setup_devices(self)
   1785         if not is_sagemaker_mp_enabled():
   1786             if not is_accelerate_available(min_version="0.20.1"):
-> 1787                 raise ImportError(
   1788                     "Using the `Trainer` with `PyTorch` requires `accelerate>=0.20.1`: Please run `pip install transformers[torch]` or `pip install accelerate -U`"
   1789                 )

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

image

So adding two steps to fix this .

Who can review?

Feel free to tag members/contributors who may be interested in your PR.

panpan0000 avatar Nov 10 '23 05:11 panpan0000

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

anyone?

panpan0000 avatar Nov 17 '23 03:11 panpan0000