From 4387ab453158b617cc2fe0bf77dc823a556c81b4 Mon Sep 17 00:00:00 2001 From: Erjia Guan Date: Thu, 23 Jun 2022 18:47:56 -0700 Subject: [PATCH] Fix S3 documentation (#542) Summary: Per title Pull Request resolved: https://github.com/pytorch/data/pull/542 Reviewed By: VitalyFedyunin Differential Revision: D37389586 Pulled By: ejguan fbshipit-source-id: 7437ea488fb80b87e8f52b133c83d8990be8db02 --- torchdata/datapipes/iter/load/README.md | 2 +- torchdata/datapipes/iter/load/s3io.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/torchdata/datapipes/iter/load/README.md b/torchdata/datapipes/iter/load/README.md index 0b397d842..02e8d035e 100644 --- a/torchdata/datapipes/iter/load/README.md +++ b/torchdata/datapipes/iter/load/README.md @@ -36,7 +36,7 @@ Note: refer to the official documentation for detailed installtion instructions Please refer to the documentation: - [`S3FileLister`](https://pytorch.org/data/main/generated/torchdata.datapipes.iter.S3FileLister.html#s3filelister) -- [`S3FileLister`](https://pytorch.org/data/main/generated/torchdata.datapipes.iter.S3FileLoader.html#s3fileloader) +- [`S3FileLoader`](https://pytorch.org/data/main/generated/torchdata.datapipes.iter.S3FileLoader.html#s3fileloader) ### Note diff --git a/torchdata/datapipes/iter/load/s3io.py b/torchdata/datapipes/iter/load/s3io.py index 9fc2f3ccc..2b3f93146 100644 --- a/torchdata/datapipes/iter/load/s3io.py +++ b/torchdata/datapipes/iter/load/s3io.py @@ -94,7 +94,7 @@ class S3FileLoaderIterDataPipe(IterDataPipe[Tuple[str, StreamWrapper]]): # https://pytorch.org/data/main/tutorial.html#working-with-dataloader >>> sharded_s3_urls = dp_s3_urls.shuffle().sharding_filter() >>> dp_s3_files = S3FileLoader(sharded_s3_urls) - >>> for url, fd in datapipe: # Start loading data + >>> for url, fd in dp_s3_files: # Start loading data ... data = fd.read() # Functional API >>> dp_s3_files = sharded_s3_urls.load_files_by_s3(buffer_size=256)