We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b8fe19 commit 15c92deCopy full SHA for 15c92de
tensorflow_datasets/core/dataset_builder.py
@@ -1540,6 +1540,12 @@ def _download_and_prepare( # pytype: disable=signature-mismatch # overriding-p
1540
split_dict = splits_lib.SplitDict(split_infos)
1541
self.info.set_splits(split_dict)
1542
1543
+ def read_text_file(self, filename: epath.PathLike) -> str:
1544
+ """Returns the text in the given file and records the lineage."""
1545
+ filename = epath.Path(filename)
1546
+ self.info.add_file_data_source_access(filename)
1547
+ return filename.read_text()
1548
+
1549
def read_tfrecord_as_dataset(
1550
self, filenames: Union[str, Sequence[str]]
1551
) -> tf.data.Dataset:
0 commit comments