Skip to content

Commit bf08410

Browse files
ejguanfacebook-github-bot
authored andcommitted
Deprecating certain functional APIs and fix an Error msg (#890)
Summary: - Continue to deprecate stuff based on #163 - Fix a typo Pull Request resolved: #890 Reviewed By: NivekT Differential Revision: D41130080 Pulled By: ejguan fbshipit-source-id: d8c1a6a4732211fcf75a08d5cb5e090a587b555b
1 parent 7127ebc commit bf08410

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

torchdata/datapipes/iter/load/fsspec.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,6 @@ def __len__(self) -> int:
148148
return len(self.source_datapipe)
149149

150150

151-
# Register for functional API for backward compatibility
152-
IterDataPipe.register_datapipe_as_function("open_file_by_fsspec", FSSpecFileOpenerIterDataPipe)
153-
154-
155151
@functional_datapipe("save_by_fsspec")
156152
class FSSpecSaverIterDataPipe(IterDataPipe[str]):
157153
r"""

torchdata/datapipes/iter/load/iopath.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,6 @@ def __len__(self) -> int:
142142
return len(self.source_datapipe)
143143

144144

145-
# Register for functional API for backward compatibility
146-
IterDataPipe.register_datapipe_as_function("open_file_by_iopath", IoPathFileOpenerIterDataPipe)
147-
148-
149145
@functional_datapipe("save_by_iopath")
150146
class IoPathSaverIterDataPipe(IterDataPipe[str]):
151147

torchdata/datapipes/iter/util/converter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __getitem__(self, index):
9090
self._load_map()
9191
return self._map[index] # type: ignore[index]
9292
except KeyError:
93-
raise IndexError(f"Index {index} is valid for IterToMapConverter.")
93+
raise IndexError(f"Index {index} is invalid for IterToMapConverter.")
9494

9595
def __len__(self):
9696
if self._map is not None:

0 commit comments

Comments
 (0)