Skip to content

accelerate or tranformers[torch] required #25

Description

@gregoryfoster

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions