STT-tensorflow/tensorflow/core/kernels/data
Andrew Audibert 3d28cdc603 [tf.data service] Improve cancellation for tf.data service requests.
1. If a DataServiceDataset iterator is cancelled, it will now call TryCancel on its outstanding RPCs.
2. As a result, we can reduce the frequency of returning from blocked round-robin requests to check whether the iterator is cancelled. This may avoid delays in GetNext() that could happen if one consumer reads from a round earlier than others, and needs to perform multiple retries with exponential backoff.
3. Because of (2), server shutdown may take up to 1 minute if a round-robin request is blocked waiting for other consumers. To prevent slow unit tests, certain tests store their servers globally so that they are destroyed immediately at process exit without waiting for their outstanding RPCs to finish.

Running data_service_ops_test.py locally, this CL reduces the time from 27 seconds to 20 seconds

PiperOrigin-RevId: 351825888
Change-Id: Iba20a456bdabf251d03b94f090fe760616d3da4d
2021-01-14 10:26:18 -08:00
..
experimental [tf.data service] Improve cancellation for tf.data service requests. 2021-01-14 10:26:18 -08:00
batch_dataset_op_test.cc
batch_dataset_op.cc [tf.data] Implement DatasetBase::InputDatasets() for core datasets. 2020-09-16 12:43:03 -07:00
batch_dataset_op.h
BUILD [tf.data] Various changes to iterator metrics collection. 2020-11-03 10:40:09 -08:00
cache_dataset_ops_test.cc
cache_dataset_ops.cc [tf.data] Log a warning when incomplete file-based cache is finalized. 2020-10-29 17:25:14 -07:00
cache_dataset_ops.h
cache_ops.cc Support iterator checkpointing with large caches. 2020-07-13 13:32:56 -07:00
cache_ops.h Support iterator checkpointing with large caches. 2020-07-13 13:32:56 -07:00
captured_function.cc Merge pull request #44523 from mkuchnik:executor_based_runsync_metrics 2020-11-06 02:10:14 -08:00
captured_function.h Merge pull request #44523 from mkuchnik:executor_based_runsync_metrics 2020-11-06 02:10:14 -08:00
concatenate_dataset_op_test.cc
concatenate_dataset_op.cc [tf.data] Implement DatasetBase::InputDatasets() for core datasets. 2020-09-16 12:43:03 -07:00
concatenate_dataset_op.h
dataset_ops.cc [tf.data] Cleaning up mobile build target. 2020-09-24 14:29:45 -07:00
dataset_ops.h [tf.data] Cleaning up mobile build target. 2020-09-24 14:29:45 -07:00
dataset_test_base.cc [TF2XLA] Remove the serialization of CustomKernelCreator, since there is only one, and we won't add new ones 2020-09-22 10:59:59 -07:00
dataset_test_base.h [tf.data] Add dataset splitting mechanism. 2020-09-16 12:08:16 -07:00
dataset_utils_test.cc [tf.data] Fix bugs in dataset hashing and add CheckGraphsEqual function. 2020-09-22 10:47:31 -07:00
dataset_utils.cc [tf.data] Fix bugs in dataset hashing and add CheckGraphsEqual function. 2020-09-22 10:47:31 -07:00
dataset_utils.h [tf.data] Fix bugs in dataset hashing and add CheckGraphsEqual function. 2020-09-22 10:47:31 -07:00
filter_dataset_op_test.cc
filter_dataset_op.cc Add similar implementation for various captured function Runs 2020-11-03 11:29:54 -05:00
filter_dataset_op.h
fixed_length_record_dataset_op_test.cc
fixed_length_record_dataset_op.cc [tf.data] Implement DatasetBase::InputDatasets() for core datasets. 2020-09-16 12:43:03 -07:00
fixed_length_record_dataset_op.h
flat_map_dataset_op_test.cc
flat_map_dataset_op.cc Merge pull request #44523 from mkuchnik:executor_based_runsync_metrics 2020-11-06 02:10:14 -08:00
flat_map_dataset_op.h
generator_dataset_op.cc Merge pull request #44523 from mkuchnik:executor_based_runsync_metrics 2020-11-06 02:10:14 -08:00
generator_dataset_op.h
hash_utils_test.cc [tf.data] Fix hashing for op functions. 2020-09-29 13:28:54 -07:00
hash_utils.cc [tf.data] Avoid visiting the same node multiple times in ComputeHash. 2020-10-06 11:53:00 -07:00
hash_utils.h [tf.data] Fix bugs in dataset hashing and add CheckGraphsEqual function. 2020-09-22 10:47:31 -07:00
interleave_dataset_op_test.cc
interleave_dataset_op.cc Add modeling support for MakeIteratorFromInputElement 2020-11-03 14:15:46 -05:00
interleave_dataset_op.h
iterator_ops.cc convert accessors to lower-case 2021-01-12 02:05:34 +05:30
iterator_ops.h handle name conflicts 2021-01-12 02:28:10 +05:30
map_dataset_op_test.cc
map_dataset_op.cc Fix line spacing 2020-11-02 17:13:37 -05:00
map_dataset_op.h
map_defun_op_test.cc Clean up DatasetOpsTestBase 2019-11-21 11:26:29 -05:00
map_defun_op.cc Switch CallFrameInterface::GetArg(int, Tensor*) to take (int, const Tensor**). 2020-04-10 18:51:55 -07:00
map_defun_op.h Refactor MapDefunOp 2019-07-15 23:16:25 -07:00
model_dataset_op.cc [tf.data] Add vlog to record how much time each optimization step takes. 2020-12-03 16:15:55 -08:00
model_dataset_op.h [tf.data] Cleaning up mobile build target. 2020-09-24 14:29:45 -07:00
multi_device_iterator_ops.cc
name_utils_test.cc
name_utils.cc
name_utils.h
optimize_dataset_op_test.cc
optimize_dataset_op.cc [tf.data] Rolls out the optimization map_parallelization as experiment to 5% of Borg jobs. 2021-01-11 13:14:20 -08:00
optimize_dataset_op.h [tf.data] Cleaning up mobile build target. 2020-09-24 14:29:45 -07:00
optional_ops.cc
optional_ops.cu.cc
optional_ops.h
padded_batch_dataset_op_test.cc
padded_batch_dataset_op.cc [tf.data] Implement DatasetBase::InputDatasets() for core datasets. 2020-09-16 12:43:03 -07:00
padded_batch_dataset_op.h
parallel_interleave_dataset_op_test.cc
parallel_interleave_dataset_op.cc [tf.data] Check cycle length when restoring parallel interleave iterator. 2020-11-16 15:36:27 -08:00
parallel_interleave_dataset_op.h
parallel_map_dataset_op_test.cc
parallel_map_dataset_op.cc [tf.data service] Implement round-robin reads. 2021-01-13 11:29:05 -08:00
parallel_map_dataset_op.h
prefetch_autotuner_test.cc [tf.data] Modify the optimization autotune_buffer_sizes so that it will inject autotuned PrefetchDatasets after non-prefetched asynchronous datasets. The optimization will also rewrite those existing non-autotuned PrefetchDatasets into autotuned with fixed start value and minimal value for the tunable parameter buffer_size. 2020-11-13 15:22:13 -08:00
prefetch_autotuner.cc [tf.data] Modify the optimization autotune_buffer_sizes so that it will inject autotuned PrefetchDatasets after non-prefetched asynchronous datasets. The optimization will also rewrite those existing non-autotuned PrefetchDatasets into autotuned with fixed start value and minimal value for the tunable parameter buffer_size. 2020-11-13 15:22:13 -08:00
prefetch_autotuner.h [tf.data] Modify the optimization autotune_buffer_sizes so that it will inject autotuned PrefetchDatasets after non-prefetched asynchronous datasets. The optimization will also rewrite those existing non-autotuned PrefetchDatasets into autotuned with fixed start value and minimal value for the tunable parameter buffer_size. 2020-11-13 15:22:13 -08:00
prefetch_dataset_op_test.cc [tf.data] Modify the optimization autotune_buffer_sizes so that it will inject autotuned PrefetchDatasets after non-prefetched asynchronous datasets. The optimization will also rewrite those existing non-autotuned PrefetchDatasets into autotuned with fixed start value and minimal value for the tunable parameter buffer_size. 2020-11-13 15:22:13 -08:00
prefetch_dataset_op.cc [tf.data] Record element sizes in IteratorGetNext xprof traces. 2020-12-17 15:09:08 -08:00
prefetch_dataset_op.h [tf.data] Modify the optimization autotune_buffer_sizes so that it will inject autotuned PrefetchDatasets after non-prefetched asynchronous datasets. The optimization will also rewrite those existing non-autotuned PrefetchDatasets into autotuned with fixed start value and minimal value for the tunable parameter buffer_size. 2020-11-13 15:22:13 -08:00
random_seed_ops.cc
random_seed_ops.h
range_dataset_op_test.cc [tf.data] Add dataset splitting mechanism. 2020-09-16 12:08:16 -07:00
range_dataset_op.cc [tf.data] Add dataset splitting mechanism. 2020-09-16 12:08:16 -07:00
range_dataset_op.h [tf.data] Add dataset splitting mechanism. 2020-09-16 12:08:16 -07:00
reduce_dataset_op_test.cc
repeat_dataset_op_test.cc
repeat_dataset_op.cc Internal change 2020-12-30 15:34:17 -08:00
repeat_dataset_op.h
rewrite_utils.cc [tf.data] Cleaning up mobile build target. 2020-09-24 14:29:45 -07:00
rewrite_utils.h [tf.data] Cleaning up mobile build target. 2020-09-24 14:29:45 -07:00
serialization_utils.cc [tf.data] Add an op that computes the statically-known batch size of a dataset where possible. 2020-07-21 15:11:49 -07:00
serialization_utils.h [tf.data] Add an op that computes the statically-known batch size of a dataset where possible. 2020-07-21 15:11:49 -07:00
shard_dataset_op_test.cc
shard_dataset_op.cc Improve error message when number of files is smaller than number of shards when trying to auto shard by FILE. 2020-09-22 15:33:23 -07:00
shard_dataset_op.h
shuffle_dataset_op_test.cc
shuffle_dataset_op.cc [tf.data] Implement DatasetBase::InputDatasets() for core datasets. 2020-09-16 12:43:03 -07:00
shuffle_dataset_op.h
single_threaded_executor_test.cc Internal tests cleanup. 2020-10-27 21:28:44 -07:00
single_threaded_executor.cc
single_threaded_executor.h
skip_dataset_op_test.cc
skip_dataset_op.cc [tf.data] Implement DatasetBase::InputDatasets() for core datasets. 2020-09-16 12:43:03 -07:00
skip_dataset_op.h
sparse_tensor_slice_dataset_op_test.cc
sparse_tensor_slice_dataset_op.cc [tf.data] Implement DatasetBase::InputDatasets() for core datasets. 2020-09-16 12:43:03 -07:00
split_utils_test.cc [tf.data] Implement splitting for tensor_slices_dataset. 2020-09-16 14:05:56 -07:00
split_utils.cc [tf.data] Implement splitting for tensor_slices_dataset. 2020-09-16 14:05:56 -07:00
split_utils.h Use TF_ prefix for thread annotations in tf.data 2020-11-16 13:37:15 -08:00
stats_utils.cc
stats_utils.h
take_dataset_op_test.cc
take_dataset_op.cc [tf.data] Implement DatasetBase::InputDatasets() for core datasets. 2020-09-16 12:43:03 -07:00
take_dataset_op.h [tf.data] Implement DatasetBase::InputDatasets() for core datasets. 2020-09-16 12:43:03 -07:00
tensor_dataset_op_test.cc
tensor_dataset_op.cc [tf.data] Implement DatasetBase::InputDatasets() for core datasets. 2020-09-16 12:43:03 -07:00
tensor_dataset_op.h
tensor_slice_dataset_op_test.cc [tf.data] Implement splitting for tensor_slices_dataset. 2020-09-16 14:05:56 -07:00
tensor_slice_dataset_op.cc [tf.data] Implement splitting for tensor_slices_dataset. 2020-09-16 14:05:56 -07:00
tensor_slice_dataset_op.h
text_line_dataset_op_test.cc
text_line_dataset_op.cc [tf.data] Implement DatasetBase::InputDatasets() for core datasets. 2020-09-16 12:43:03 -07:00
text_line_dataset_op.h
tf_record_dataset_op_test.cc Fix TFRecord uncompressed test cases 2020-11-11 15:23:11 -05:00
tf_record_dataset_op.cc [tf.data] Implement DatasetBase::InputDatasets() for core datasets. 2020-09-16 12:43:03 -07:00
tf_record_dataset_op.h
unbounded_thread_pool_test.cc
unbounded_thread_pool.cc
unbounded_thread_pool.h
window_dataset_op_test.cc
window_dataset_op.cc [tf.data] Fixing a bug in tf.data.Dataset.window handling of drop_remainder=True. 2020-10-02 16:19:09 -07:00
window_dataset_op.h
window_dataset.cc [tf.data] Implement DatasetBase::InputDatasets() for core datasets. 2020-09-16 12:43:03 -07:00
window_dataset.h
zip_dataset_op_test.cc
zip_dataset_op.cc [tf.data] Implement DatasetBase::InputDatasets() for core datasets. 2020-09-16 12:43:03 -07:00
zip_dataset_op.h