Skip to content

Commit

Permalink
Merge branch 'stateful-dataloader' of https://github.com/byi8220/acce…
Browse files Browse the repository at this point in the history
…lerate into stateful-dataloader
  • Loading branch information
byi8220 committed Jul 15, 2024
2 parents 0ffc64b + 45db4b9 commit 03a7774
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/accelerate/data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def __init__(self, dataset, use_stateful_dataloader=False, batch_sampler=None, *
self.use_stateful_dataloader = use_stateful_dataloader

if use_stateful_dataloader and not is_torchdata_stateful_dataloader_available():
raise ValueError("StatefulDataLoader is not available. Please install torchdata to use it.")
raise ImportError("StatefulDataLoader is not available. Please install torchdata to use it.")
if use_stateful_dataloader:
self.base_dataloader = StatefulDataLoader(dataset, batch_sampler=batch_sampler, **kwargs)
else:
Expand Down
2 changes: 1 addition & 1 deletion src/accelerate/utils/dataclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ class DataLoaderConfiguration:
use_stateful_dataloader: bool = field(
default=False,
metadata={
"help": "If set to true, the dataloader prepared by the Accelerator will be backed by "
"help": "If set to `True`, the dataloader prepared by the Accelerator will be backed by "
"[torchdata.StatefulDataLoader](https://github.com/pytorch/data/tree/main/torchdata/stateful_dataloader). This requires a version"
" of `torchdata` with StatefulDataLoader to be installed."
},
Expand Down

0 comments on commit 03a7774

Please sign in to comment.