Skip to content

Commit

Permalink
Fix f-string to show ACCELERATE_MIN_VERSION on error (#35189)
Browse files Browse the repository at this point in the history
fix f-string to show ACCELERATE_MIN_VERSION on error

Co-authored-by: Marc Sun <[email protected]>
  • Loading branch information
KSafran and SunMarc authored Dec 27, 2024
1 parent f63da20 commit 3b0a94e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/training_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -2164,7 +2164,7 @@ def _setup_devices(self) -> "torch.device":
if not is_accelerate_available():
raise ImportError(
f"Using the `Trainer` with `PyTorch` requires `accelerate>={ACCELERATE_MIN_VERSION}`: "
"Please run `pip install transformers[torch]` or `pip install 'accelerate>={ACCELERATE_MIN_VERSION}'`"
f"Please run `pip install transformers[torch]` or `pip install 'accelerate>={ACCELERATE_MIN_VERSION}'`"
)
# We delay the init of `PartialState` to the end for clarity
accelerator_state_kwargs = {"enabled": True, "use_configured_state": False}
Expand Down

0 comments on commit 3b0a94e

Please sign in to comment.