TF_Serving : no such target '//tensorflow_serving/example:grpc_client'

When trying to build grpc_client.py I ran below command,

bazel build //tensorflow_serving/example:grpc_client

For how I reached till this step, you can check previous page.

Above command generated following error,

Fri May 19 06:46:37 UTC 2017:cdpdemo:/home/cdpdemo/PythonCode/serving>bazel build //tensorflow_serving/example:grpc_client
WARNING: /home/cdpdemo/.cache/bazel/_bazel_cdpdemo/9d1d47a9193250486b60cb5a51a8dcb3/external/org_tensorflow/tensorflow/workspace.bzl:128:5: tf_repo_name was specified to tf_workspace but is no longer used and will be removed in the future.
ERROR: no such target '//tensorflow_serving/example:grpc_client': target 'grpc_client' not declared in package 'tensorflow_serving/example' (did you mean 'grpc_client.py'?) defined by /home/cdpdemo/PythonCode/serving/tensorflow_serving/example/BUILD.
INFO: Elapsed time: 1.706s

This is because grpc_client was not defined in file - "/home/cdpdemo/PythonCode/serving/tensorflow_serving/example/BUILD"

I added following to the file,

py_binary(
    name = "grpc_client",
    srcs = [
        "grpc_client.py",
    ],
    deps = [
        "//tensorflow_serving/apis:predict_proto_py_pb2",
        "//tensorflow_serving/apis:prediction_service_proto_py_pb2",
        "@org_tensorflow//tensorflow:tensorflow_py",
    ],
)

Then when i executed above command it worked.

results for ""

    No results matching ""