Skip to content

Commit

Permalink
fixed indent
Browse files Browse the repository at this point in the history
  • Loading branch information
stsouko committed May 1, 2023
1 parent f7eef77 commit f4906d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch/utils/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def __init__(self, dataset: Dataset[T_co], indices: Sequence[int]) -> None:

# add batched sampling support when parent dataset supports it.
# see torch.utils.data._utils.fetch._MapDatasetFetcher
if hasattr(dataset, "__getitems__") and dataset.__getitems__: # type: ignore[attr-defined]
if getattr(dataset, "__getitems__", None):
self.__getitems__ = self._getitems

def __getitem__(self, idx):
Expand Down

0 comments on commit f4906d6

Please sign in to comment.