-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
I am adding slim-inception-v4 into tensorflow serving examples. I found the slim BUILD file was recently updated with several libraries include a explicit dependency to tensorflow, e.g.,
#- tf_models/research/slim/BUILD
py_library(
name = "dataset_utils",
srcs = ["datasets/dataset_utils.py"],
deps = [
# "//tensorflow",
],
)
However, this cause an issue when, say, define a local repository in tensorflow_serving/workspace.bzl as the one defined for including tf_models/research/inception.
#- tensorflow_serving/workspace.bzl
def tf_serving_workspace():
native.new_local_repository(
name = "inception_model",
path = "tf_models/research/inception",
build_file = "tf_models/research/inception/inception/BUILD",
)
native.new_local_repository(
name = "slim_model",
path = "tf_models/research/slim",
build_file = "tf_models/research/slim/BUILD",
)
tf_workspace(path_prefix = "", tf_repo_name = "org_tensorflow")
The issue is that later bazel is complaining about cannot find @slim_model//tensorflow.
I have limit knowledge on bazel. From my understanding is that, a deps = ["//tensorflow", ] will look for a tensorflow directory under tf_models/research/slim. But there is no such directory as tf_models/research/slim/tensorflow.
I solved the issue by commenting out all deps on //tensorflow. Here is a detailed description of how I served slim-inception-v4 https://gyang274.github.io/docker-tensorflow-serving-slim/0x02.slim.html.
Would you kindly let me know the reason of including an explicit dependency to //tensorflow? Specifically,
-
What is the reason for adding this dependency recently?
-
Why //tensorflow, rather than define a http/git repository? And, how slim would know where //tensorflow is pointed?
-
How is this BUILD file expected to be used?
Thank you very much!