Skip to content

Commit 998afc3

Browse files
author
The TensorFlow Datasets Authors
committed
Internal change
PiperOrigin-RevId: 788353351
1 parent 4627fce commit 998afc3

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

tensorflow_datasets/core/load.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
from tensorflow_datasets.core.utils import version as version_lib
5050
from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow as tf
5151

52+
5253
# pylint: disable=logging-format-interpolation
5354

5455
Tree = type_utils.Tree
@@ -183,6 +184,7 @@ def get_dataset_repr() -> str:
183184
f' explicitly set. Wrong arguments for {get_dataset_repr()}'
184185
)
185186
builder_kwargs['data_dir'] = gcs_utils.gcs_path('datasets')
187+
186188
if name.namespace:
187189
if name.namespace == 'huggingface':
188190
return huggingface_dataset_builder.builder(
@@ -827,12 +829,8 @@ def data_source(
827829
""" # fmt:skip
828830
builder_kwargs = _set_file_format_for_data_source(data_dir, builder_kwargs)
829831
_validate_file_format_for_data_source(builder_kwargs)
830-
dbuilder = _fetch_builder(
831-
name,
832-
data_dir,
833-
builder_kwargs,
834-
try_gcs,
835-
)
832+
833+
dbuilder = _fetch_builder(name, data_dir, builder_kwargs, try_gcs)
836834
_download_and_prepare_builder(dbuilder, download, download_and_prepare_kwargs)
837835
return dbuilder.as_data_source(
838836
split=split, decoders=decoders, deserialize_method=deserialize_method

tensorflow_datasets/testing/dataset_builder_testing.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,10 @@ def _test_checksums(self):
425425
f"Some urls checksums are missing at: {filepath}\n{err_msg}",
426426
)
427427

428-
def _download_and_prepare_as_dataset(self, builder):
428+
def _download_and_prepare_as_dataset(
429+
self,
430+
builder,
431+
):
429432
# Provide the manual dir only if builder has MANUAL_DOWNLOAD_INSTRUCTIONS
430433
# set.
431434

@@ -461,7 +464,9 @@ def _download_and_prepare_as_dataset(self, builder):
461464
beam_runner=beam_runner,
462465
)
463466
with self._test_key_not_local_path(builder):
464-
builder.download_and_prepare(download_config=download_config)
467+
builder.download_and_prepare(
468+
download_config=download_config,
469+
)
465470

466471
with self._subTest("as_dataset"):
467472
self._assertAsDataset(builder)

0 commit comments

Comments
 (0)