Skip to content

Commit

Permalink
Update accelerator.py
Browse files Browse the repository at this point in the history
  • Loading branch information
stas00 authored Dec 1, 2023
1 parent 0e48b23 commit 77628ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/accelerate/accelerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1427,14 +1427,14 @@ def _prepare_deepspeed(self, *args):

if any(bs is None for bs in batch_sizes):
raise ValueError(
"At least one of the dataloaders passed to `accelerate.prepare()` has `None` as batch size."
"Please set an integer value in `train_micro_batch_size_per_gpu` in the deepspeed config file"
"At least one of the dataloaders passed to `accelerate.prepare()` has `None` as batch size. "
"Please set an integer value in `train_micro_batch_size_per_gpu` in the deepspeed config file "
"or assign integer value to `AcceleratorState().deepspeed_plugin.deepspeed_config['train_micro_batch_size_per_gpu']`."
)
if len(batch_sizes) == 0:
raise ValueError(
"When using DeepSpeed `accelerate.prepare()` requires you to pass at least one of training or evaluation dataloaders "
"or alternatively set an integer value in `train_micro_batch_size_per_gpu` in the deepspeed config file"
"or alternatively set an integer value in `train_micro_batch_size_per_gpu` in the deepspeed config file "
"or assign integer value to `AcceleratorState().deepspeed_plugin.deepspeed_config['train_micro_batch_size_per_gpu']`."
)

Expand Down

0 comments on commit 77628ec

Please sign in to comment.