Skip to content

Commit 93f323b

Browse files
author
The TensorFlow Datasets Authors
committed
Merge pull request #5367 from albanie:patch-1
PiperOrigin-RevId: 627306052
2 parents 680df0b + 3ecf453 commit 93f323b

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

tensorflow_datasets/core/dataset_builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def __init__(
259259
Args:
260260
data_dir: directory to read/write data. Defaults to the value of the
261261
environment variable TFDS_DATA_DIR, if set, otherwise falls back to
262-
datasets are stored.
262+
"~/tensorflow_datasets".
263263
config: `tfds.core.BuilderConfig` or `str` name, optional configuration
264264
for the dataset that affects the data generated on disk. Different
265265
`builder_config`s will have their own subdirectories and versions.
@@ -268,7 +268,7 @@ def __init__(
268268
special value "experimental_latest" will use the highest version, even
269269
if not default. This is not recommended unless you know what you are
270270
doing, as the version could be broken.
271-
"""
271+
""" # fmt: skip
272272
if data_dir:
273273
data_dir = os.fspath(data_dir) # Pathlib -> str
274274
# For pickling:

tensorflow_datasets/core/load.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ def load(
583583
all splits in a `Dict[Split, tf.data.Dataset]`
584584
data_dir: directory to read/write data. Defaults to the value of the
585585
environment variable TFDS_DATA_DIR, if set, otherwise falls back to
586-
datasets are stored.
586+
'~/tensorflow_datasets'.
587587
batch_size: `int`, if set, add a batch dimension to examples. Note that
588588
variable length features will be 0-padded. If `batch_size=-1`, will return
589589
the full dataset as `tf.Tensor`s.
@@ -593,7 +593,7 @@ def load(
593593
`tfds.core.DatasetBuilder.download_and_prepare` before calling
594594
`tfds.core.DatasetBuilder.as_dataset`. If `False`, data is expected to be
595595
in `data_dir`. If `True` and the data is already in `data_dir`,
596-
when data_dir is a Placer path.
596+
`download_and_prepare` is a no-op.
597597
as_supervised: `bool`, if `True`, the returned `tf.data.Dataset` will have a
598598
2-tuple structure `(input, label)` according to
599599
`builder.info.supervised_keys`. If `False`, the default, the returned
@@ -637,7 +637,7 @@ def load(
637637
(version, features, splits, num_examples,...). Note that the `ds_info`
638638
object documents the entire dataset, regardless of the `split` requested.
639639
Split-specific information is available in `ds_info.splits`.
640-
"""
640+
""" # fmt: skip
641641
dbuilder = _fetch_builder(
642642
name,
643643
data_dir,
@@ -752,12 +752,12 @@ def data_source(
752752
all splits in a `Dict[Split, Sequence]`
753753
data_dir: directory to read/write data. Defaults to the value of the
754754
environment variable TFDS_DATA_DIR, if set, otherwise falls back to
755-
datasets are stored.
755+
'~/tensorflow_datasets'.
756756
download: `bool` (optional), whether to call
757757
`tfds.core.DatasetBuilder.download_and_prepare` before calling
758758
`tfds.core.DatasetBuilder.as_data_source`. If `False`, data is expected to
759759
be in `data_dir`. If `True` and the data is already in `data_dir`,
760-
when data_dir is a Placer path.
760+
`download_and_prepare` is a no-op.
761761
decoders: Nested dict of `Decoder` objects which allow to customize the
762762
decoding. The structure should match the feature structure, but only
763763
customized feature keys need to be present. See [the
@@ -784,7 +784,7 @@ def data_source(
784784
Returns:
785785
`Sequence` if `split`,
786786
`dict<key: tfds.Split, value: Sequence>` otherwise.
787-
"""
787+
""" # fmt:skip
788788
builder_kwargs = _set_file_format_for_data_source(builder_kwargs)
789789
dbuilder = _fetch_builder(
790790
name,

tensorflow_datasets/core/naming.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,13 @@ class DatasetReference:
202202
provided.
203203
data_dir: Optional data dir where this dataset is located. If None, defaults
204204
to the value of the environment variable TFDS_DATA_DIR, if set, otherwise
205+
falls back to '~/tensorflow_datasets'.
205206
split_mapping: mapping between split names. If the `DatasetCollection` wants
206207
to use different split names than the source datasets, then this mapping
207208
can be used. For example, if the collection uses the split `valid`, but
208209
this dataset uses the split `validation`, then the `split_mapping` should
209210
be `{'validation': 'valid'}`.
210-
"""
211+
""" # fmt: skip
211212

212213
dataset_name: str
213214
namespace: None | str = None

0 commit comments

Comments
 (0)