Skip to content

Commit 099144b

Browse files
tomvdwThe TensorFlow Datasets Authors
authored andcommitted
Use the file suffix instead file format enum value
PiperOrigin-RevId: 670954878
1 parent c34c94c commit 099144b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

tensorflow_datasets/scripts/cli/convert_format_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def _shard_instructions_for_split(
8686

8787
in_filename_template = split_info.filename_template
8888
out_filename_template = in_filename_template.replace(
89-
data_dir=out_path, filetype_suffix=out_file_format.value
89+
data_dir=out_path, filetype_suffix=out_file_format.file_suffix
9090
)
9191
num_shards = len(split_info.shard_lengths)
9292
if num_shards <= 0:

tensorflow_datasets/scripts/cli/convert_format_utils_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ def test_shard_instructions_for_split():
6666
]
6767

6868

69+
70+
6971
def test_create_out_dir():
7072
actual = convert_format_utils._create_out_dir(
7173
dataset_dir='/a/b/c/d',

0 commit comments

Comments
 (0)