aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/kafka
diff options
context:
space:
mode:
authorGravatar Jiri Simsa <jsimsa@google.com>2018-08-10 15:57:45 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-08-10 16:01:41 -0700
commit8d532ac40f4db7f5293610fd3c6e92a3f7409b76 (patch)
treef0a57897cac3baa4259ff8a9293befec3dcf1d35 /tensorflow/contrib/kafka
parent84af5e7061f82240828f72c7b484a1a66b8c4f7f (diff)
[tf.data] Optimization checkpointing improvements.
This CL: - changes the `OptimizeDataset` checkpointing logic to checkpoint the optimized dataset (as opposed to the original dataset + the optimizations, re-running optimization every time a checkpoint is restored) - replaces `OpKernelContext` with newly introduced `SerializationContext` in the signature of `AsGraphDefInternal` to reduce the scope of the context and also simplify the logic for overriding the `FunctionLibraryDefinition` when optimizations take place PiperOrigin-RevId: 208282562
Diffstat (limited to 'tensorflow/contrib/kafka')
-rw-r--r--tensorflow/contrib/kafka/kernels/kafka_dataset_ops.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/contrib/kafka/kernels/kafka_dataset_ops.cc b/tensorflow/contrib/kafka/kernels/kafka_dataset_ops.cc
index 588e456bd6..92ae79d3c7 100644
--- a/tensorflow/contrib/kafka/kernels/kafka_dataset_ops.cc
+++ b/tensorflow/contrib/kafka/kernels/kafka_dataset_ops.cc
@@ -84,7 +84,8 @@ class KafkaDatasetOp : public DatasetOpKernel {
string DebugString() const override { return "KafkaDatasetOp::Dataset"; }
protected:
- Status AsGraphDefInternal(DatasetGraphDefBuilder* b,
+ Status AsGraphDefInternal(SerializationContext* ctx,
+ DatasetGraphDefBuilder* b,
Node** output) const override {
Node* topics = nullptr;
TF_RETURN_IF_ERROR(b->AddVector(topics_, &topics));