From 339b79839f6e21ebed093677ee6dd76b9d8dc36c Mon Sep 17 00:00:00 2001 From: Tom van der Weide Date: Mon, 9 Dec 2024 05:27:52 -0800 Subject: [PATCH] Internal change PiperOrigin-RevId: 704247578 --- tensorflow_datasets/core/utils/shard_utils.py | 3 ++- tensorflow_datasets/core/utils/shard_utils_test.py | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorflow_datasets/core/utils/shard_utils.py b/tensorflow_datasets/core/utils/shard_utils.py index 3708df47745..429405335a7 100644 --- a/tensorflow_datasets/core/utils/shard_utils.py +++ b/tensorflow_datasets/core/utils/shard_utils.py @@ -20,9 +20,10 @@ - tfrecord_writer, to read sharded bucket files (temp files), based on final sharding needs. """ + from __future__ import annotations -from collections.abc import Sequence +from collections.abc import Iterable, Sequence import dataclasses import math import os diff --git a/tensorflow_datasets/core/utils/shard_utils_test.py b/tensorflow_datasets/core/utils/shard_utils_test.py index 149ec771f02..1882b178e37 100644 --- a/tensorflow_datasets/core/utils/shard_utils_test.py +++ b/tensorflow_datasets/core/utils/shard_utils_test.py @@ -240,6 +240,5 @@ def test_incorrect_values(self, filename, skip, take, examples_in_shard, msg): with self.assertRaisesRegex(ValueError, expected_regex=msg): shard_utils.FileInstruction(filename, skip, take, examples_in_shard) - if __name__ == '__main__': testing.test_main()