Skip to content

Commit

Permalink
Update tensorflow_model_server_test to depend on the pip installed te…
Browse files Browse the repository at this point in the history
…nsorflow.

Bazel BUILD dependencies on @org_tensorflow//tensorflow:tensorflow_py will be removed in subsequent CLs.

PiperOrigin-RevId: 452087986
  • Loading branch information
gharibian authored and tensorflow-copybara committed May 31, 2022
1 parent 7166e2e commit 04b8676
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tensorflow_serving/model_servers/tensorflow_model_server_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,19 @@
import json
import os
import subprocess
import sys
import time

# This is a placeholder for a Google-internal import.

# During the creation of the 'tensorflow_serving' package, bazel emits a python
# 'tensorflow' module which contains its dependencies (e.g. example.proto).
# Since bazel python libraries take precedence in sys.path and the created
# 'tensorflow' module will not be fully constructed, we reorder the bazel-out
# python libs to take a lower precedence than the pip installed packages.
sys.path = ([i for i in sys.path if 'bazel-out' not in i] +
[i for i in sys.path if 'bazel-out' in i])

# This is a placeholder for a Google-internal import. # pylint: disable=g-import-not-at-top

import grpc
from six.moves import range
Expand Down

0 comments on commit 04b8676

Please sign in to comment.