"vscode:/vscode.git/clone" did not exist on "7ffe25f2b935dcaf65079b04c5f91c8a42a99e28"
Unverified Commit 45e3d649 authored by Zachary Mueller's avatar Zachary Mueller Committed by GitHub
Browse files

Update error message when Accelerate isn't installed (#23373)

Update error
parent ea0eb156
......@@ -1611,7 +1611,7 @@ class TrainingArguments:
logger.info("PyTorch: setting up devices")
if not is_sagemaker_mp_enabled() and not is_accelerate_available(check_partial_state=True):
raise ImportError(
"Using the `Trainer` with `PyTorch` requires `accelerate`: Run `pip install --upgrade accelerate`"
"Using the `Trainer` with `PyTorch` requires `accelerate>=0.19.0`: Please run `pip install transformers[torch]` or `pip install accelerate -U`"
)
if self.no_cuda:
self.distributed_state = PartialState(cpu=True, backend=self.ddp_backend)
......
......@@ -502,7 +502,7 @@ def is_protobuf_available():
def is_accelerate_available(check_partial_state=False):
if check_partial_state:
return _accelerate_available and version.parse(_accelerate_version) >= version.parse("0.17.0")
return _accelerate_available and version.parse(_accelerate_version) >= version.parse("0.19.0")
return _accelerate_available
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment