Skip to content

Commit

Permalink
enable Shuffler in Caltech prototype (#4517)
Browse files Browse the repository at this point in the history
Co-authored-by: Vasilis Vryniotis <datumbox@users.noreply.github.com>
  • Loading branch information
pmeier and datumbox authored Oct 1, 2021
1 parent 6d9ab57 commit 05d7651
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions torchvision/prototype/datasets/_builtin/caltech.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ def _make_datapipe(

images_dp = TarArchiveReader(images_dp)
images_dp = Filter(images_dp, self._is_not_background_image)
# FIXME: add this after https://github.com/pytorch/pytorch/issues/65808 is resolved
# images_dp = Shuffler(images_dp, buffer_size=INFINITE_BUFFER_SIZE)
images_dp = Shuffler(images_dp, buffer_size=INFINITE_BUFFER_SIZE)

anns_dp = TarArchiveReader(anns_dp)
anns_dp = Filter(anns_dp, self._is_ann)
Expand Down Expand Up @@ -189,8 +188,7 @@ def _make_datapipe(
dp = resource_dps[0]
dp = TarArchiveReader(dp)
dp = Filter(dp, self._is_not_rogue_file)
# FIXME: add this after https://github.com/pytorch/pytorch/issues/65808 is resolved
# dp = Shuffler(dp, buffer_size=INFINITE_BUFFER_SIZE)
dp = Shuffler(dp, buffer_size=INFINITE_BUFFER_SIZE)
return Mapper(dp, self._collate_and_decode_sample, fn_kwargs=dict(decoder=decoder))

def generate_categories_file(self, root: Union[str, pathlib.Path]) -> None:
Expand Down

0 comments on commit 05d7651

Please sign in to comment.