diff --git a/torchdata/datapipes/iter/load/fsspec.py b/torchdata/datapipes/iter/load/fsspec.py index f7b49867b..9f961b1c1 100644 --- a/torchdata/datapipes/iter/load/fsspec.py +++ b/torchdata/datapipes/iter/load/fsspec.py @@ -87,7 +87,7 @@ def __iter__(self) -> Iterator[str]: if fs.isfile(path): yield root else: - for file_name in fs.ls(path): + for file_name in fs.ls(path, detail=False): # Ensure it returns List[str], not List[Dict] if not match_masks(file_name, self.masks): continue