From cdae1a1ee05a5a7ff95a3159acda7cce68a4a2de Mon Sep 17 00:00:00 2001 From: Amit Patankar Date: Tue, 17 Nov 2020 16:56:50 -0800 Subject: [PATCH] Move the data/experimental proto files into the proto top level directory. This effort is a part of the build file and package cleanup. PiperOrigin-RevId: 342975430 Change-Id: I009ef3bc1d963a8cd29e456e32b97127e545d32b --- tensorflow/core/data/service/dispatcher_impl.cc | 2 +- tensorflow/core/data/service/dispatcher_impl.h | 2 +- tensorflow/core/data/service/grpc_dispatcher_impl.cc | 2 +- tensorflow/core/data/service/grpc_dispatcher_impl.h | 2 +- tensorflow/core/data/service/grpc_worker_impl.h | 2 +- tensorflow/core/data/service/server_lib.h | 2 +- tensorflow/core/data/service/test_cluster.cc | 2 +- tensorflow/core/data/service/worker_impl.h | 2 +- tensorflow/core/kernels/data/experimental/io_ops.cc | 2 +- .../kernels/data/experimental/snapshot_dataset_op.cc | 2 +- .../core/kernels/data/experimental/snapshot_util.cc | 2 +- tensorflow/core/protobuf/BUILD | 11 +++++++---- .../{data/experimental => }/service_config.proto | 0 .../protobuf/{data/experimental => }/snapshot.proto | 0 .../python/data/experimental/service/server_lib.py | 2 +- .../data/experimental/service/server_lib_wrapper.cc | 2 +- 16 files changed, 20 insertions(+), 17 deletions(-) rename tensorflow/core/protobuf/{data/experimental => }/service_config.proto (100%) rename tensorflow/core/protobuf/{data/experimental => }/snapshot.proto (100%) diff --git a/tensorflow/core/data/service/dispatcher_impl.cc b/tensorflow/core/data/service/dispatcher_impl.cc index 545bd1c13f3..5e865242fd1 100644 --- a/tensorflow/core/data/service/dispatcher_impl.cc +++ b/tensorflow/core/data/service/dispatcher_impl.cc @@ -42,7 +42,7 @@ limitations under the License. #include "tensorflow/core/lib/core/errors.h" #include "tensorflow/core/platform/errors.h" #include "tensorflow/core/platform/path.h" -#include "tensorflow/core/protobuf/data/experimental/service_config.pb.h" +#include "tensorflow/core/protobuf/service_config.pb.h" #include "tensorflow/core/public/session_options.h" namespace tensorflow { diff --git a/tensorflow/core/data/service/dispatcher_impl.h b/tensorflow/core/data/service/dispatcher_impl.h index 2d19813c080..e8cd3954d59 100644 --- a/tensorflow/core/data/service/dispatcher_impl.h +++ b/tensorflow/core/data/service/dispatcher_impl.h @@ -25,7 +25,7 @@ limitations under the License. #include "tensorflow/core/data/service/worker.grpc.pb.h" #include "tensorflow/core/lib/core/status.h" #include "tensorflow/core/platform/mutex.h" -#include "tensorflow/core/protobuf/data/experimental/service_config.pb.h" +#include "tensorflow/core/protobuf/service_config.pb.h" #include "tensorflow/core/public/session.h" namespace tensorflow { diff --git a/tensorflow/core/data/service/grpc_dispatcher_impl.cc b/tensorflow/core/data/service/grpc_dispatcher_impl.cc index 3345bc476b7..456fdfcc583 100644 --- a/tensorflow/core/data/service/grpc_dispatcher_impl.cc +++ b/tensorflow/core/data/service/grpc_dispatcher_impl.cc @@ -17,7 +17,7 @@ limitations under the License. #include "grpcpp/server_context.h" #include "tensorflow/core/distributed_runtime/rpc/grpc_util.h" -#include "tensorflow/core/protobuf/data/experimental/service_config.pb.h" +#include "tensorflow/core/protobuf/service_config.pb.h" namespace tensorflow { namespace data { diff --git a/tensorflow/core/data/service/grpc_dispatcher_impl.h b/tensorflow/core/data/service/grpc_dispatcher_impl.h index 99cd0336a30..ec6ffbb2d3f 100644 --- a/tensorflow/core/data/service/grpc_dispatcher_impl.h +++ b/tensorflow/core/data/service/grpc_dispatcher_impl.h @@ -19,7 +19,7 @@ limitations under the License. #include "grpcpp/server_builder.h" #include "tensorflow/core/data/service/dispatcher.grpc.pb.h" #include "tensorflow/core/data/service/dispatcher_impl.h" -#include "tensorflow/core/protobuf/data/experimental/service_config.pb.h" +#include "tensorflow/core/protobuf/service_config.pb.h" namespace tensorflow { namespace data { diff --git a/tensorflow/core/data/service/grpc_worker_impl.h b/tensorflow/core/data/service/grpc_worker_impl.h index 734865e3447..c094d12d59d 100644 --- a/tensorflow/core/data/service/grpc_worker_impl.h +++ b/tensorflow/core/data/service/grpc_worker_impl.h @@ -19,7 +19,7 @@ limitations under the License. #include "grpcpp/server_builder.h" #include "tensorflow/core/data/service/worker.grpc.pb.h" #include "tensorflow/core/data/service/worker_impl.h" -#include "tensorflow/core/protobuf/data/experimental/service_config.pb.h" +#include "tensorflow/core/protobuf/service_config.pb.h" namespace tensorflow { namespace data { diff --git a/tensorflow/core/data/service/server_lib.h b/tensorflow/core/data/service/server_lib.h index c9981008248..ed92097a45c 100644 --- a/tensorflow/core/data/service/server_lib.h +++ b/tensorflow/core/data/service/server_lib.h @@ -20,7 +20,7 @@ limitations under the License. #include "grpcpp/server_builder.h" #include "tensorflow/core/lib/core/status.h" #include "tensorflow/core/profiler/rpc/profiler_service_impl.h" -#include "tensorflow/core/protobuf/data/experimental/service_config.pb.h" +#include "tensorflow/core/protobuf/service_config.pb.h" namespace tensorflow { namespace data { diff --git a/tensorflow/core/data/service/test_cluster.cc b/tensorflow/core/data/service/test_cluster.cc index 49f7eaef30d..9d93ca416ee 100644 --- a/tensorflow/core/data/service/test_cluster.cc +++ b/tensorflow/core/data/service/test_cluster.cc @@ -18,7 +18,7 @@ limitations under the License. #include "absl/strings/str_split.h" #include "tensorflow/core/data/service/server_lib.h" #include "tensorflow/core/platform/errors.h" -#include "tensorflow/core/protobuf/data/experimental/service_config.pb.h" +#include "tensorflow/core/protobuf/service_config.pb.h" namespace tensorflow { namespace data { diff --git a/tensorflow/core/data/service/worker_impl.h b/tensorflow/core/data/service/worker_impl.h index 75424cf2485..a93de37e2c8 100644 --- a/tensorflow/core/data/service/worker_impl.h +++ b/tensorflow/core/data/service/worker_impl.h @@ -22,7 +22,7 @@ limitations under the License. #include "tensorflow/core/data/service/worker.pb.h" #include "tensorflow/core/data/standalone.h" #include "tensorflow/core/lib/core/status.h" -#include "tensorflow/core/protobuf/data/experimental/service_config.pb.h" +#include "tensorflow/core/protobuf/service_config.pb.h" #include "tensorflow/core/public/session.h" namespace tensorflow { diff --git a/tensorflow/core/kernels/data/experimental/io_ops.cc b/tensorflow/core/kernels/data/experimental/io_ops.cc index 734614d3a2e..7d976aa4d1f 100644 --- a/tensorflow/core/kernels/data/experimental/io_ops.cc +++ b/tensorflow/core/kernels/data/experimental/io_ops.cc @@ -22,7 +22,7 @@ limitations under the License. #include "tensorflow/core/platform/cpu_info.h" #include "tensorflow/core/platform/errors.h" #include "tensorflow/core/platform/stringprintf.h" -#include "tensorflow/core/protobuf/data/experimental/snapshot.pb.h" +#include "tensorflow/core/protobuf/snapshot.pb.h" namespace tensorflow { namespace data { diff --git a/tensorflow/core/kernels/data/experimental/snapshot_dataset_op.cc b/tensorflow/core/kernels/data/experimental/snapshot_dataset_op.cc index 5114b7ebd2c..5628dc40e3b 100644 --- a/tensorflow/core/kernels/data/experimental/snapshot_dataset_op.cc +++ b/tensorflow/core/kernels/data/experimental/snapshot_dataset_op.cc @@ -56,7 +56,7 @@ limitations under the License. #include "tensorflow/core/platform/macros.h" #include "tensorflow/core/platform/stringprintf.h" #include "tensorflow/core/profiler/lib/traceme.h" -#include "tensorflow/core/protobuf/data/experimental/snapshot.pb.h" +#include "tensorflow/core/protobuf/snapshot.pb.h" #include "tensorflow/core/util/batch_util.h" #include "tensorflow/core/util/ptr_util.h" diff --git a/tensorflow/core/kernels/data/experimental/snapshot_util.cc b/tensorflow/core/kernels/data/experimental/snapshot_util.cc index 33ce9956cbc..12ffd55722b 100644 --- a/tensorflow/core/kernels/data/experimental/snapshot_util.cc +++ b/tensorflow/core/kernels/data/experimental/snapshot_util.cc @@ -38,7 +38,7 @@ limitations under the License. #include "tensorflow/core/platform/random.h" #include "tensorflow/core/platform/stringprintf.h" #include "tensorflow/core/profiler/lib/traceme.h" -#include "tensorflow/core/protobuf/data/experimental/snapshot.pb.h" +#include "tensorflow/core/protobuf/snapshot.pb.h" namespace tensorflow { namespace data { diff --git a/tensorflow/core/protobuf/BUILD b/tensorflow/core/protobuf/BUILD index 2a0352d0b5e..d1cbf872087 100644 --- a/tensorflow/core/protobuf/BUILD +++ b/tensorflow/core/protobuf/BUILD @@ -138,8 +138,8 @@ exports_files( "control_flow.proto", # TODO(ebrevdo): Re-enable once CriticalSection is in core. # "critical_section.proto", - "data/experimental/snapshot.proto", - "data/experimental/service_config.proto", + "snapshot.proto", + "service_config.proto", "debug_event.proto", "meta_graph.proto", "named_tensor.proto", @@ -164,8 +164,11 @@ tf_proto_library( "control_flow.proto", # TODO(ebrevdo): Re-enable once CriticalSection is in core. # "critical_section.proto", - "data/experimental/snapshot.proto", - "data/experimental/service_config.proto", + # TODO: Move snapshot.proto and service_config.proto to a separate package. + # NOTE: Creating an alias and adding the files does not work in OSS. + # NOTE: tf_proto_library requires files to be in the same package. + "snapshot.proto", + "service_config.proto", "debug_event.proto", "meta_graph.proto", "named_tensor.proto", diff --git a/tensorflow/core/protobuf/data/experimental/service_config.proto b/tensorflow/core/protobuf/service_config.proto similarity index 100% rename from tensorflow/core/protobuf/data/experimental/service_config.proto rename to tensorflow/core/protobuf/service_config.proto diff --git a/tensorflow/core/protobuf/data/experimental/snapshot.proto b/tensorflow/core/protobuf/snapshot.proto similarity index 100% rename from tensorflow/core/protobuf/data/experimental/snapshot.proto rename to tensorflow/core/protobuf/snapshot.proto diff --git a/tensorflow/python/data/experimental/service/server_lib.py b/tensorflow/python/data/experimental/service/server_lib.py index addd20fb73b..e9006487551 100644 --- a/tensorflow/python/data/experimental/service/server_lib.py +++ b/tensorflow/python/data/experimental/service/server_lib.py @@ -21,7 +21,7 @@ from __future__ import print_function import collections # pylint: disable=invalid-import-order,g-bad-import-order, unused-import -from tensorflow.core.protobuf.data.experimental import service_config_pb2 +from tensorflow.core.protobuf import service_config_pb2 from tensorflow.python import pywrap_tensorflow from tensorflow.python.data.experimental.service import _pywrap_server_lib from tensorflow.python.util.tf_export import tf_export diff --git a/tensorflow/python/data/experimental/service/server_lib_wrapper.cc b/tensorflow/python/data/experimental/service/server_lib_wrapper.cc index 5a229f88d92..90c97d7a30c 100644 --- a/tensorflow/python/data/experimental/service/server_lib_wrapper.cc +++ b/tensorflow/python/data/experimental/service/server_lib_wrapper.cc @@ -23,7 +23,7 @@ limitations under the License. #include "pybind11/stl.h" #include "tensorflow/core/data/service/server_lib.h" #include "tensorflow/core/platform/errors.h" -#include "tensorflow/core/protobuf/data/experimental/service_config.pb.h" +#include "tensorflow/core/protobuf/service_config.pb.h" #include "tensorflow/python/lib/core/pybind11_lib.h" #include "tensorflow/python/lib/core/pybind11_status.h"