Skip to content

Conversation

Copy link

Copilot AI commented Oct 29, 2025

Eliminates the build-time dependency on the full TensorFlow and TensorFlow Serving repositories by extracting only the required .proto files. This reduces build complexity while maintaining API compatibility.

Changes

New third_party/tensorflow_serving_protos/ directory:

  • 96 .proto files from TensorFlow Serving 2.18.0 and TensorFlow (commit 5329ec8d)
  • Organized as: tensorflow_serving/apis/, tensorflow_serving/config/, tensorflow/core/{framework,example,protobuf}/
  • BUILD file with 7 cc_proto_library targets using existing @com_google_protobuf//:protobuf.bzl style

Updated dependencies:

  • WORKSPACE: Added new_local_repository for tensorflow_serving_protos
  • BUILD.bazel: Proto deps changed from @tensorflow_serving//tensorflow_serving/apis:* to @tensorflow_serving_protos//:*
  • src/BUILD: Updated tfs_utils and libovmshttpservermodule targets

Preserved C++ utility dependencies:

  • tensorflow_serving/util:json_tensor, threadpool_executor, net_http remain as-is (these are C++ implementations, not protos)

Usage

# Before
deps = ["@tensorflow_serving//tensorflow_serving/apis:prediction_service_cc_proto"]

# After  
deps = ["@tensorflow_serving_protos//:prediction_service_cc_proto"]

All proto compilation now occurs within Bazel, not in Dockerfiles.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • releases.bazel.build
    • Triggering command: /usr/local/lib/node_modules/@bazel/bazelisk/bazelisk-linux_amd64 version (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Replace dependency on whole tensorflow serving/tensorflow with dependency on just protobuf files required to create tensorflow serving compatible service. Create new dependency eg. tensorflow_serving_protos, and BUILD file that would just use .proto files required. It will need .proto files from tensorflow, but again we don't want to build tensorflow. I prefere to have this dependency inside bazel not in Dockerfiles.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits October 29, 2025 14:24
…UILD dependencies

Co-authored-by: atobiszei <36039266+atobiszei@users.noreply.github.com>
Co-authored-by: atobiszei <36039266+atobiszei@users.noreply.github.com>
Co-authored-by: atobiszei <36039266+atobiszei@users.noreply.github.com>
Co-authored-by: atobiszei <36039266+atobiszei@users.noreply.github.com>
Copilot AI changed the title [WIP] Replace tensorflow dependency with protobuf files for serving Replace TensorFlow Serving dependency with proto-only dependency Oct 29, 2025
Copilot AI requested a review from atobiszei October 29, 2025 14:36
@atobiszei
Copy link
Collaborator

@copilot You did not replace dependency. You added files manually inside repository which I don't want'. I still want to extract those proto files form tensorflow/serving repositories but don't want to build entire tensorflow/ tensorflow serving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants