Skip to content

Commit

Permalink
undo super().__reduce__() again
Browse files Browse the repository at this point in the history
  • Loading branch information
byi8220 committed Sep 4, 2024
1 parent 17713e7 commit 073d7b3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/accelerate/data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,19 @@ def __len__(self):
return math.ceil(whole_length / self.state.num_processes)

def __reduce__(self):
return super().__reduce__()
return (
DataLoaderDispatcher,
(
self.base_dataloader.dataset,
self.split_batches,
self.skip_batches,
self.use_stateful_dataloader,
self._drop_last,
self._non_blocking,
self.slice_fn,
),
self.__dict__,
)

@property
def total_batch_size(self):
Expand Down

0 comments on commit 073d7b3

Please sign in to comment.