-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate docstrings to doctests (#901)
Summary: ### Changes Migrate docstrings to doctest - torchdata/dataloader2/adapter.py - torchdata/datapipes/iter/load/* Use PEP8 style in code examples, e.g. add newlines between defs: ``` from torchdata.datapipes.iter import IterableWrapper def filepath_fn(name: str) -> str: return dir_path + name name_to_data = {"1.txt": b"DATA1", "2.txt": b"DATA2", "3.txt": b"DATA3"} source_dp = IterableWrapper(sorted(name_to_data.items())) fsspec_saver_dp = source_dp.save_by_fsspec(filepath_fn=filepath_fn, mode="wb") res_file_paths = list(fsspec_saver_dp)` ``` Pull Request resolved: #901 Reviewed By: bdhirsh Differential Revision: D44518888 Pulled By: NivekT fbshipit-source-id: 787a91c4b83a73140c83c198e5c24c82407a5fdb
- Loading branch information
1 parent
4ba17dd
commit 837ede1
Showing
6 changed files
with
225 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.