Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/tensorflow/python/data/experimental/__init__.py: 100%

71 statements  

« prev     ^ index     » next       coverage.py v7.4.0, created at 2024-01-03 07:57 +0000

1# Copyright 2017 The TensorFlow Authors. All Rights Reserved. 

2# 

3# Licensed under the Apache License, Version 2.0 (the "License"); 

4# you may not use this file except in compliance with the License. 

5# You may obtain a copy of the License at 

6# 

7# http://www.apache.org/licenses/LICENSE-2.0 

8# 

9# Unless required by applicable law or agreed to in writing, software 

10# distributed under the License is distributed on an "AS IS" BASIS, 

11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 

12# See the License for the specific language governing permissions and 

13# limitations under the License. 

14# ============================================================================== 

15"""Experimental API for building input pipelines. 

16 

17This module contains experimental `Dataset` sources and transformations that can 

18be used in conjunction with the `tf.data.Dataset` API. Note that the 

19`tf.data.experimental` API is not subject to the same backwards compatibility 

20guarantees as `tf.data`, but we will provide deprecation advice in advance of 

21removing existing functionality. 

22 

23See [Importing Data](https://tensorflow.org/guide/datasets) for an overview. 

24 

25@@AutoShardPolicy 

26@@AutotuneAlgorithm 

27@@AutotuneOptions 

28@@CheckpointInputPipelineHook 

29@@Counter 

30@@CsvDataset 

31@@DatasetInitializer 

32@@DatasetStructure 

33@@DistributeOptions 

34@@ExternalStatePolicy 

35@@OptimizationOptions 

36@@Optional 

37@@OptionalStructure 

38@@RaggedTensorStructure 

39@@RandomDataset 

40@@Reducer 

41@@SparseTensorStructure 

42@@SqlDataset 

43@@Structure 

44@@TFRecordWriter 

45@@TensorArrayStructure 

46@@TensorStructure 

47@@ThreadingOptions 

48 

49@@assert_cardinality 

50@@at 

51@@bucket_by_sequence_length 

52@@cardinality 

53@@choose_from_datasets 

54@@copy_to_device 

55@@dense_to_ragged_batch 

56@@dense_to_sparse_batch 

57@@distribute 

58@@enable_debug_mode 

59@@enumerate_dataset 

60@@from_list 

61@@from_variant 

62@@get_next_as_optional 

63@@get_single_element 

64@@get_structure 

65@@group_by_reducer 

66@@group_by_window 

67@@ignore_errors 

68@@index_table_from_dataset 

69@@load 

70@@make_batched_features_dataset 

71@@make_csv_dataset 

72@@make_saveable_from_iterator 

73@@map_and_batch 

74@@map_and_batch_with_legacy_function 

75@@parallel_interleave 

76@@parse_example_dataset 

77@@prefetch_to_device 

78@@rejection_resample 

79@@sample_from_datasets 

80@@save 

81@@scan 

82@@shuffle_and_repeat 

83@@snapshot 

84@@table_from_dataset 

85@@take_while 

86@@to_variant 

87@@unbatch 

88@@unique 

89 

90@@AUTOTUNE 

91@@INFINITE_CARDINALITY 

92@@SHARD_HINT 

93@@UNKNOWN_CARDINALITY 

94""" 

95 

96# pylint: disable=unused-import 

97from tensorflow.python.data.experimental import service 

98from tensorflow.python.data.experimental.ops.batching import dense_to_ragged_batch 

99from tensorflow.python.data.experimental.ops.batching import dense_to_sparse_batch 

100from tensorflow.python.data.experimental.ops.batching import map_and_batch 

101from tensorflow.python.data.experimental.ops.batching import map_and_batch_with_legacy_function 

102from tensorflow.python.data.experimental.ops.batching import unbatch 

103from tensorflow.python.data.experimental.ops.cardinality import assert_cardinality 

104from tensorflow.python.data.experimental.ops.cardinality import cardinality 

105from tensorflow.python.data.experimental.ops.cardinality import INFINITE as INFINITE_CARDINALITY 

106from tensorflow.python.data.experimental.ops.cardinality import UNKNOWN as UNKNOWN_CARDINALITY 

107from tensorflow.python.data.experimental.ops.counter import Counter 

108from tensorflow.python.data.experimental.ops.distribute import SHARD_HINT 

109from tensorflow.python.data.experimental.ops.enumerate_ops import enumerate_dataset 

110from tensorflow.python.data.experimental.ops.error_ops import ignore_errors 

111from tensorflow.python.data.experimental.ops.from_list import from_list 

112from tensorflow.python.data.experimental.ops.get_single_element import get_single_element 

113from tensorflow.python.data.experimental.ops.grouping import bucket_by_sequence_length 

114from tensorflow.python.data.experimental.ops.grouping import group_by_reducer 

115from tensorflow.python.data.experimental.ops.grouping import group_by_window 

116from tensorflow.python.data.experimental.ops.grouping import Reducer 

117from tensorflow.python.data.experimental.ops.interleave_ops import choose_from_datasets 

118from tensorflow.python.data.experimental.ops.interleave_ops import parallel_interleave 

119from tensorflow.python.data.experimental.ops.interleave_ops import sample_from_datasets 

120from tensorflow.python.data.experimental.ops.io import load 

121from tensorflow.python.data.experimental.ops.io import save 

122from tensorflow.python.data.experimental.ops.iterator_ops import CheckpointInputPipelineHook 

123from tensorflow.python.data.experimental.ops.iterator_ops import make_saveable_from_iterator 

124from tensorflow.python.data.experimental.ops.lookup_ops import DatasetInitializer 

125from tensorflow.python.data.experimental.ops.lookup_ops import index_table_from_dataset 

126from tensorflow.python.data.experimental.ops.lookup_ops import table_from_dataset 

127from tensorflow.python.data.experimental.ops.parsing_ops import parse_example_dataset 

128from tensorflow.python.data.experimental.ops.prefetching_ops import copy_to_device 

129from tensorflow.python.data.experimental.ops.prefetching_ops import prefetch_to_device 

130from tensorflow.python.data.experimental.ops.random_access import at 

131from tensorflow.python.data.experimental.ops.random_ops import RandomDataset 

132from tensorflow.python.data.experimental.ops.readers import CsvDataset 

133from tensorflow.python.data.experimental.ops.readers import make_batched_features_dataset 

134from tensorflow.python.data.experimental.ops.readers import make_csv_dataset 

135from tensorflow.python.data.experimental.ops.readers import SqlDataset 

136from tensorflow.python.data.experimental.ops.resampling import rejection_resample 

137from tensorflow.python.data.experimental.ops.scan_ops import scan 

138from tensorflow.python.data.experimental.ops.shuffle_ops import shuffle_and_repeat 

139from tensorflow.python.data.experimental.ops.snapshot import snapshot 

140from tensorflow.python.data.experimental.ops.take_while_ops import take_while 

141from tensorflow.python.data.experimental.ops.unique import unique 

142from tensorflow.python.data.experimental.ops.writers import TFRecordWriter 

143from tensorflow.python.data.ops.dataset_ops import AUTOTUNE 

144from tensorflow.python.data.ops.dataset_ops import DatasetSpec as DatasetStructure 

145from tensorflow.python.data.ops.dataset_ops import from_variant 

146from tensorflow.python.data.ops.dataset_ops import get_structure 

147from tensorflow.python.data.ops.dataset_ops import to_variant 

148from tensorflow.python.data.ops.debug_mode import enable_debug_mode 

149from tensorflow.python.data.ops.iterator_ops import get_next_as_optional 

150from tensorflow.python.data.ops.optional_ops import Optional 

151from tensorflow.python.data.ops.optional_ops import OptionalSpec as OptionalStructure 

152from tensorflow.python.data.ops.options import AutoShardPolicy 

153from tensorflow.python.data.ops.options import AutotuneAlgorithm 

154from tensorflow.python.data.ops.options import AutotuneOptions 

155from tensorflow.python.data.ops.options import DistributeOptions 

156from tensorflow.python.data.ops.options import ExternalStatePolicy 

157from tensorflow.python.data.ops.options import OptimizationOptions 

158from tensorflow.python.data.ops.options import ThreadingOptions 

159from tensorflow.python.data.util.structure import _RaggedTensorStructure as RaggedTensorStructure 

160from tensorflow.python.data.util.structure import _SparseTensorStructure as SparseTensorStructure 

161from tensorflow.python.data.util.structure import _TensorArrayStructure as TensorArrayStructure 

162from tensorflow.python.data.util.structure import _TensorStructure as TensorStructure 

163from tensorflow.python.framework.type_spec import TypeSpec as Structure 

164# pylint: enable=unused-import 

165 

166from tensorflow.python.util.all_util import remove_undocumented 

167 

168_allowed_symbols = [ 

169 "service", 

170] 

171 

172remove_undocumented(__name__, _allowed_symbols)