Skip to content

Commit

Permalink
Fix MpDeviceLoaderWrapper not having attribute batch_sampler (#2242)
Browse files Browse the repository at this point in the history
* Fix MpDeviceLoaderWrapper not having attribute batch_sampler

* fix style
  • Loading branch information
vanbasten23 authored Dec 13, 2023
1 parent eafcea0 commit ad3a5bc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/accelerate/data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,10 @@ def total_batch_size(self):
def total_dataset_length(self):
return self._loader.total_dataset_length

@property
def batch_sampler(self):
return self._loader.batch_sampler


class DataLoaderDispatcher(DataLoader, DataLoaderStateMixin):
"""
Expand Down

0 comments on commit ad3a5bc

Please sign in to comment.