Skip to content

Commit

Permalink
Move core/logging.proto -> apis/logging.proto
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 374459486
  • Loading branch information
netfs authored and tensorflow-copybara committed May 18, 2021
1 parent e846c66 commit 37c64b8
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 51 deletions.
24 changes: 22 additions & 2 deletions tensorflow_serving/apis/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,37 @@ tf_jspb_proto_library(
deps = [":predict_proto"],
)

serving_proto_library(
name = "logging_proto",
srcs = ["logging.proto"],
cc_api_version = 2,
deps = [
":model_proto",
"//tensorflow_serving/config:logging_config_proto",
],
)

serving_proto_library_py(
name = "logging_proto_py_pb2",
srcs = ["logging.proto"],
proto_library = "logging_proto",
deps = [
":model_proto_py_pb2",
"//tensorflow_serving/config:logging_config_proto_py_pb2",
],
)

serving_proto_library(
name = "prediction_log_proto",
srcs = ["prediction_log.proto"],
cc_api_version = 2,
deps = [
":classification_proto",
":inference_proto",
":logging_proto",
":predict_proto",
":regression_proto",
":session_service_proto",
"//tensorflow_serving/core:logging_proto",
],
)

Expand All @@ -153,7 +173,7 @@ serving_proto_library_py(
":predict_proto_py_pb2",
":regression_proto_py_pb2",
":session_service_proto_py_pb2",
"//tensorflow_serving/core:logging_proto_py_pb2",
"//tensorflow_serving/apis:logging_proto_py_pb2",
],
)

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions tensorflow_serving/apis/prediction_log.proto
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
syntax = "proto3";

option cc_enable_arenas = true;
package tensorflow.serving;

import "tensorflow_serving/apis/classification.proto";
import "tensorflow_serving/apis/inference.proto";
import "tensorflow_serving/apis/logging.proto";
import "tensorflow_serving/apis/predict.proto";
import "tensorflow_serving/apis/regression.proto";
import "tensorflow_serving/apis/session_service.proto";
import "tensorflow_serving/core/logging.proto";

package tensorflow.serving;
option cc_enable_arenas = true;

message ClassifyLog {
ClassificationRequest request = 1;
Expand Down
36 changes: 4 additions & 32 deletions tensorflow_serving/core/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Description: Tensorflow Serving core.

load("//tensorflow_serving:serving.bzl", "serving_proto_library", "serving_proto_library_py")

package(
default_visibility = [
"//tensorflow_serving:internal",
Expand Down Expand Up @@ -765,32 +763,6 @@ cc_test(
],
)

serving_proto_library(
name = "logging_proto",
srcs = ["logging.proto"],
cc_api_version = 2,
visibility = [
"//visibility:public",
],
deps = [
"//tensorflow_serving/apis:model_proto",
"//tensorflow_serving/config:logging_config_proto",
],
)

serving_proto_library_py(
name = "logging_proto_py_pb2",
srcs = ["logging.proto"],
proto_library = "logging_proto",
visibility = [
"//visibility:public",
],
deps = [
"//tensorflow_serving/apis:model_proto_py_pb2",
"//tensorflow_serving/config:logging_config_proto_py_pb2",
],
)

cc_library(
name = "request_logger",
srcs = ["request_logger.cc"],
Expand All @@ -800,7 +772,7 @@ cc_library(
],
deps = [
":log_collector",
":logging_cc_proto",
"//tensorflow_serving/apis:logging_cc_proto",
"//tensorflow_serving/config:logging_config_cc_proto",
"@com_google_protobuf//:protobuf",
"@org_tensorflow//tensorflow/core:lib",
Expand All @@ -813,8 +785,8 @@ cc_test(
srcs = ["request_logger_test.cc"],
deps = [
":log_collector",
":logging_cc_proto",
":request_logger",
"//tensorflow_serving/apis:logging_cc_proto",
"//tensorflow_serving/apis:model_cc_proto",
"//tensorflow_serving/apis:predict_cc_proto",
"//tensorflow_serving/config:logging_config_cc_proto",
Expand All @@ -837,9 +809,9 @@ cc_library(
],
deps = [
":request_logger",
"//tensorflow_serving/apis:logging_cc_proto",
"//tensorflow_serving/apis:model_cc_proto",
"//tensorflow_serving/config:logging_config_cc_proto",
"//tensorflow_serving/core:logging_cc_proto",
"//tensorflow_serving/util:fast_read_dynamic_ptr",
"@com_google_protobuf//:protobuf",
"@org_tensorflow//tensorflow/core:lib",
Expand All @@ -852,8 +824,8 @@ cc_test(
srcs = ["server_request_logger_test.cc"],
deps = [
":log_collector",
":logging_cc_proto",
":server_request_logger",
"//tensorflow_serving/apis:logging_cc_proto",
"//tensorflow_serving/apis:model_cc_proto",
"//tensorflow_serving/apis:predict_cc_proto",
"//tensorflow_serving/config:log_collector_config_cc_proto",
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_serving/core/request_logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ limitations under the License.

#include "google/protobuf/message.h"
#include "tensorflow/core/lib/core/status.h"
#include "tensorflow_serving/apis/logging.pb.h"
#include "tensorflow_serving/config/logging_config.pb.h"
#include "tensorflow_serving/core/log_collector.h"
#include "tensorflow_serving/core/logging.pb.h"

namespace tensorflow {
namespace serving {
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_serving/core/request_logger_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ limitations under the License.
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/core/status.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow_serving/apis/logging.pb.h"
#include "tensorflow_serving/apis/model.pb.h"
#include "tensorflow_serving/apis/predict.pb.h"
#include "tensorflow_serving/config/logging_config.pb.h"
#include "tensorflow_serving/core/log_collector.h"
#include "tensorflow_serving/core/logging.pb.h"
#include "tensorflow_serving/core/test_util/mock_log_collector.h"
#include "tensorflow_serving/core/test_util/mock_request_logger.h"
#include "tensorflow_serving/test_util/test_util.h"
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_serving/core/server_request_logger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ limitations under the License.
#include "tensorflow/core/lib/gtl/map_util.h"
#include "tensorflow/core/lib/strings/proto_serialization.h"
#include "tensorflow/core/platform/macros.h"
#include "tensorflow_serving/apis/logging.pb.h"
#include "tensorflow_serving/apis/model.pb.h"
#include "tensorflow_serving/core/logging.pb.h"

namespace tensorflow {
namespace serving {
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_serving/core/server_request_logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ limitations under the License.

#include "google/protobuf/message.h"
#include "tensorflow/core/lib/core/status.h"
#include "tensorflow_serving/apis/logging.pb.h"
#include "tensorflow_serving/config/logging_config.pb.h"
#include "tensorflow_serving/core/logging.pb.h"
#include "tensorflow_serving/core/request_logger.h"
#include "tensorflow_serving/util/fast_read_dynamic_ptr.h"

Expand Down
2 changes: 1 addition & 1 deletion tensorflow_serving/core/server_request_logger_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ limitations under the License.
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/core/status.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow_serving/apis/logging.pb.h"
#include "tensorflow_serving/apis/model.pb.h"
#include "tensorflow_serving/apis/predict.pb.h"
#include "tensorflow_serving/config/log_collector_config.pb.h"
#include "tensorflow_serving/config/logging_config.pb.h"
#include "tensorflow_serving/core/log_collector.h"
#include "tensorflow_serving/core/logging.pb.h"
#include "tensorflow_serving/core/test_util/fake_log_collector.h"
#include "tensorflow_serving/core/test_util/mock_request_logger.h"
#include "tensorflow_serving/test_util/test_util.h"
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_serving/core/test_util/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ cc_library(
testonly = 1,
hdrs = ["mock_request_logger.h"],
deps = [
"//tensorflow_serving/core:logging_cc_proto",
"//tensorflow_serving/apis:logging_cc_proto",
"//tensorflow_serving/core:request_logger",
"@com_google_googletest//:gtest",
"@com_google_protobuf//:protobuf",
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_serving/core/test_util/mock_request_logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ limitations under the License.
#include "google/protobuf/message.h"
#include <gmock/gmock.h>
#include "tensorflow/core/lib/core/status.h"
#include "tensorflow_serving/apis/logging.pb.h"
#include "tensorflow_serving/config/logging_config.pb.h"
#include "tensorflow_serving/core/log_collector.h"
#include "tensorflow_serving/core/logging.pb.h"
#include "tensorflow_serving/core/request_logger.h"

namespace tensorflow {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ limitations under the License.
#include <gmock/gmock.h>
#include "tensorflow/core/lib/core/status.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow_serving/apis/logging.proto.h"
#include "tensorflow_serving/apis/model.pb.h"
#include "tensorflow_serving/config/model_server_config.pb.h"
#include "tensorflow_serving/config/platform_config.pb.h"
#include "tensorflow_serving/core/aspired_versions_manager.h"
#include "tensorflow_serving/core/logging.pb.h"
#include "tensorflow_serving/core/servable_handle.h"
#include "tensorflow_serving/core/servable_state.h"
#include "tensorflow_serving/core/servable_state_monitor.h"
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_serving/tools/pip_package/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ sh_binary(
"//tensorflow_serving/config:logging_config_proto_py_pb2",
"//tensorflow_serving/config:model_server_config_proto_py_pb2",
"//tensorflow_serving/config:file_system_storage_path_source_proto_py_pb2",
"//tensorflow_serving/core:logging_proto_py_pb2",
"//tensorflow_serving/apis:logging_proto_py_pb2",
],
)
5 changes: 0 additions & 5 deletions tensorflow_serving/tools/pip_package/build_pip_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ function main() {
echo $(date) : "=== Using tmpdir: ${TMPDIR}"
mkdir -p ${TMPDIR}/tensorflow_serving/apis
mkdir -p ${TMPDIR}/tensorflow_serving/config
mkdir -p ${TMPDIR}/tensorflow_serving/core

echo "Adding python files"
cp bazel-out/k8-opt/bin/tensorflow_serving/apis/*_pb2.py \
Expand All @@ -51,12 +50,8 @@ function main() {
cp bazel-out/k8-opt/bin/tensorflow_serving/config/*_pb2.py \
"${TMPDIR}/tensorflow_serving/config"

cp bazel-out/k8-opt/bin/tensorflow_serving/core/*_pb2.py \
"${TMPDIR}/tensorflow_serving/core"

touch "${TMPDIR}/tensorflow_serving/apis/__init__.py"
touch "${TMPDIR}/tensorflow_serving/config/__init__.py"
touch "${TMPDIR}/tensorflow_serving/core/__init__.py"
touch "${TMPDIR}/tensorflow_serving/__init__.py"

echo "Adding package setup files"
Expand Down

0 comments on commit 37c64b8

Please sign in to comment.