speakerbox icon indicating copy to clipboard operation
speakerbox copied to clipboard

accelerate or tranformers[torch] required

Open gregoryfoster opened this issue 1 year ago • 2 comments

Describe the Bug

After a small training run, the program halted with the following error indicating a required library was missing.

Expected Behavior

Completion of training.

Reproduction

pipenv install speakerbox==1.2.0 Execute script that calls speakerbox.train()

...
File "...code/transcribe/.venv/lib/python3.10/site-packages/speakerbox/main.py", line 265, in train
    args = TrainingArguments(
  File "<string>", line 117, in __init__
  File "...code/transcribe/.venv/lib/python3.10/site-packages/transformers/training_args.py", line 1442, in __post_init__
    and (self.device.type != "cuda")
  File "...code/transcribe/.venv/lib/python3.10/site-packages/transformers/training_args.py", line 1887, in device
    return self._setup_devices
  File "...code/transcribe/.venv/lib/python3.10/site-packages/transformers/utils/generic.py", line 54, in __get__
    cached = self.fget(obj)
  File "...code/transcribe/.venv/lib/python3.10/site-packages/transformers/training_args.py", line 1787, in _setup_devices
    raise ImportError(
ImportError: Using the `Trainer` with `PyTorch` requires `accelerate>=0.20.1`: Please run `pip install transformers[torch]` or `pip install accelerate -U`

Environment

  • OS Version: macOS 13.4
  • Python: 3.10.13
  • speakerbox Version: 1.2.0

gregoryfoster avatar Nov 16 '23 21:11 gregoryfoster