Skip to content

Commit 31af8d4

Browse files
authored
shards (#3645)
1 parent b7493a8 commit 31af8d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/accelerate/data_loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1201,7 +1201,7 @@ def prepare_data_loader(
12011201
is_datasets_available()
12021202
and isinstance(new_dataset, DatasetsIterableDataset)
12031203
and not split_batches
1204-
and new_dataset.n_shard > num_processes
1204+
and new_dataset.n_shards > num_processes
12051205
):
12061206
new_dataset = new_dataset.shard(num_shards=num_processes, index=process_index)
12071207
elif isinstance(new_dataset, IterableDataset):

0 commit comments

Comments
 (0)